I created a script to check for the cgminer process, checkminer.sh:
#!/bin/bash
ps cax | grep cgminer > /dev/null
if [ $? -eq 1 ]; then
/bin/bash /root/launchminer.sh
fi
Then created launchminer.sh:
#!/bin/bash
screen -dmS cgminer sudo /root/cgminer/cgminer --bmsc-options 115200:0.57 -o stratum+tcp://solo.ckpool.org:3333 -u [mybtcaddress] -p x --bmsc-voltage 0800 --bmsc-freq 1286
then using crontab run the script every minute:
1 * * * * /bin/bash /root/checkminer.sh
Seems to be working to keep the miners online.