Post
Topic
Board Hardware
Re: GekkoScience NewPac Stickminer Official Support Thread
by
Valnurat
on 11/04/2019, 21:44:29 UTC
so you want to make a .sh file (shell script).

first line is always "#!/bin/sh"  (a.k.a hashbang then the script type.)
Then you include the command you would enter into the terminal on the next line.

obviously, it can get a lot more complicated, just like batch files, but that's the first step.

simple example:  run.sh

Code:
#!/bin/sh

cgminer -o stratum+tcp://pool.ckpool.org:3333 -u 1HpnRjN2ru4NhYFrZFsXe3JXCyJWW9fDeh.2pac -p x --suggest-diff 1  --gekko-2pac-freq 200

after you've made your .sh file, you need to make it executable.  the command for that is "chmod +x run.sh", or if you have a GUI, you can right click on it, and on one of the property pages you can select to make it executable.

then to run a shell script, you need to type in "./run.sh".  the dot slash is critical.

In connection with this, I would like to ask some n00b questions.
1st. What version of the Raspbian should I use?
2nd. Where do you save the run.sh?
3rd. How can you make the run.sh run at startup?
4th. How do you supervise your PI's?