Post
Topic
Board Mining
Re: [Guide]How to setup an automated headless LinuxCoin mining rig + watchdog
by
pixilated8
on 07/09/2011, 17:47:44 UTC
You can create another script that runs every minute or 10 minutes to monitor.  For example:
Code:
#!/bin/bash

WHAT="phoenix"
CMD=`sudo ps -ef | grep -v grep | grep ${WHAT} | wc | awk '{print $1}'`

if [ ${CMD} -le 0 ]; then
  echo "stopped running.  restart here."
  exit 1
else
  echo "it's running.  no need to do anything."
fi
exit 0
This will look for a running instance of phoenix.  Of course, if you have more than one instance, you may have to fine tune what you are searching for to make it unique.  I have something similar that checks to make sure my miners are running.  And if it doesn't find it, the miner gets restarted.