Can somebody please assist a frustrated Linux noob? I am trying to make an a “autostart script” work on a headless miner, Xubuntu 11.04 (full install on HDD) using CGMiner 2.3.2.
I have Googled and searched the Forum endlessly and can only find what to me are vague outlines of how to do this. After days of frustration with my limited knowledge of Linux I cannot get these scripts to run properly. The best of what I have been able to find are the two examples below which I have been trying to use as guides.
host + &> /dev/null
cd ~/miners/cgminer # or wherever your cgminer directory is
# logs/ is assumed to be in the cgminer directory
diff cgminer.conf $(ls -1 logs/*.conf | tail -n 1) &> /dev/null || cp cgminer.conf logs/$now.conf
DISPLAY=:0 cgminer -c cgminer.conf 2> logs/$now.log
screen -d -m -S cgminer cgminer <options>
At the moment if I want to start and run this Miner I do the following, turn on the AC power to the Miner, after it boots, log-in from my Laptop:-
's password: miner <ENTER>
miner@miner:~$ cd /home/miner/cgminer-2.3.2 <ENTER>
miner@miner:~/cgminer-2.3.2$ sudo ./cgminer <ENTER>
[sudo] password for miner: miner <ENTER>
and the Miner starts using the parameters entered previously in the cgminer.conf which is located in:- /home/joeblow/.cgminer.
However I cannot close the Terminal or disconnect the laptop as the Miner shuts down.
What I am trying to achieve is a miner that will auto start on the restoration of the AC power and boot into screen after about a 240 second sleep. I am not concerned with logging etc. I simply want it to start by using the established cgminer.conf and boot into screen so I can log-in and out from a laptop.
Idea’s pleeease!!! (I dont want to go back to the “DarkSide”..........Windoze)
Edit --- Update
Now have script "miner.sh" below in /home/joeblow The script will run from the terminal ie "sudo ./miner.sh" However it will not start/run thru the Settings/Application AutoStart panel.
screen -d -m -S cgminer
./cgminer ## .... 2> run.$now.$$.log
Anybody know what it is that I am not doing??