while [ 1 ]; do
./cgminer -o ....
sleep 5
done
If cgminer stops for any reason, this will wait 5 seconds and then restart the script. Just basically puts it into a loop. Since the last 2 updates I haven't really noticed it restarting, at least not like it was before the May updates. But at least this will kick them back off instead of remaining offline until you physically get back on the system to restart the script.
I tried the following but it keeps loading new instances every 5 seconds. Is there something i'm missing here?
while [ 1 ]; do
gnome-terminal -e "/home/cgminer/cgminer -o stratum+tcp://btc.viabtc.com:3333 -u Xylander.gekko1 -p x --suggest-diff 560 --gekko-newpac-detect --gekko-newpac-freq 425"
sleep 5
done