Tag: watchdog
-
Linux watchdog
Simple watchdog script for monitoring linux processes (e.g. cgminer) #!/bin/bash NAME=cgminer START=”sudo -u pi screen -dmS cgminer /home/pi/cgminer/cgminer” GREP=/bin/grep PS=/bin/ps NOP=/bin/true DATE=/bin/date NOTIFY=person1email NOTIFYCC=person2email MAIL=/bin/mail RM=/bin/rm $PS -ef|$GREP -v grep|$GREP $NAME >/dev/null 2>&1 case „$?” in 0) # It is running in this case so we do nothing. $NOP ;; 1) echo „$NAME is NOT…