I have 10 GPU attached to one system and want to mine with all, as ubuntu GUI not allow to run 10 GPU at a time, So will go with the command line and able to mine there.
Now I want to run my miner on system startup for particular this I am following this tutorial (step-7). I have done all the things as per tutorial but not able to start ./start_only_eth.bash command(no screen session created) in screen session.
If I am executing below command, I am able to find this session using "screen -ls" command.
screen -dmS ethm
Below is my script (demo.sh)
// update
#!/bin/bash
DEFAULT_DELAY=0
if [ "x$1" = "x" -o "x$1" = "xnone" ]; then
DELAY=$DEFAULT_DELAY
else
DELAY=$1
fi
sleep $DELAY
su aman -c "screen -dmS ethm /home/aman/Desktop/claymore/start_only_eth.bash"
I have added this script's path in rc.local file as mentioned in this tutorial (step-7).
below is my rc.local
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
sh '/home/aman/Desktop/demo.sh'
exit 0
After restart if I execute "screen -ls" command I got below message
No Sockets found in /var/run/screen/S-aman.
Note: I think problem is not in rc.local, problem is in demo.sh. If try to execute demo.sh manually the script will fail and got above message.
// // -------------------------- With TMUX -------------------- // //
I have also tried this with tmux, this time I am able to run miner(manually) in tmux session but again fail to run script using rc.local for this below is my demo.sh
#!/bin/bash
tmux new-session -d -n MINER
tmux send-keys -t MINER "cd /home/aman/Desktop/claymore" C-m
tmux send-keys -t MINER "./start_only_eth.bash" C-m
Below is what I am getting(console) when try to test rc.local
aman@aman-System-Product-Name:~$ sudo /etc/init.d/rc.local start
[sudo] password for aman:
[ ok ] Starting rc.local (via systemctl): rc.local.service.