Post
Topic
Board Hardware
Re: GekkoScience NewPac Stickminer Official Support Thread
by
House Xylander
on 08/12/2018, 16:43:23 UTC
Save this code as mine.sh, edit the line starting with lxterminal with the full path to your cgminer folder and then put in the commands you usually use for your pool, mark as an executing program and run.  It goes in a loop so to exit, just use control C.

Code:
#!/bin/sh
echo "Restarting cgminer every 6 hours"
while true
do
 lxterminal -e "/home/USERNAME/cgminer/cgminer -o POOL_URL -u USER -p PW --suggest-diff 128"
 sleep 21600
 pkill -f cgminer
 echo "Restarting cgminer..."
 sleep 4
done

Can I run cgminer from separate directories to get 2 sessions to restart every 6 hours or is there different code for doing this?