Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Linux Script - New TMUX session start miner at reboot
sleep 30
tmux new-session -s nh -d
sleep 2
tmux send-keys -t nh 'export GPU_SYNC_OBJECTS=1' 'Enter'
sleep 2
tmux send-keys -t nh 'export GPU_FORCE_64BIT_PTR=1' 'Enter'
sleep 2
tmux send-keys -t nh 'cd ~/optiminer' 'Enter'
sleep 2
tmux send-keys -t nh './optiminer-zcash -i 4 -s 1hTQRoaw9CDkow29QQYGBotWGcVtnK28G -p x' 'Enter'
Lets save the file as "" and make it executable
sudo chmod +x
I use ubuntu desktop so I usually add it to start-up programs, but if you use server you can add it to your crontab file.

sudo crontab -e
at the bottom without comments in front add "@reboot /home/USER/PATH/" just don't forget to change the USER and PATH to where ever you have your miner binaries. Save the new crontab and try it out by typing in command line,
sudo shutdown -r now
Now when your rig boots, your miner will start in a new TMUX session that you can SSH into your system to check your sessions by typing,

tmux a -t nh
"nh" is what I named the session due to me using NiceHash stratum, but you can change the "nh" to whatever fits your needs.


Forum Jump:

Users browsing this thread: 1 Guest(s)
Expand chat