lolminer_service.sh 725 B

1234567891011121314151617181920
  1. #!/bin/bash
  2. if [ -f /tmp/lolminer ]; then sudo rm /tmp/lolminer;fi
  3. if [ -f /etc/init.d/lolminer ]; then sudo rm /etc/init.d/lolminer;fi
  4. cat <<'EOF'>> /tmp/lolminer
  5. #!/bin/sh -e
  6. ### BEGIN INIT INFO
  7. # Provides: lolminer
  8. # Required-Start: networking
  9. # Default-Start: 3 4 5
  10. # Default-Stop: 0 6
  11. ### END INIT INFO
  12. cd /home/wareck/miners/lolminer/
  13. su root -c "screen -dmS lolminer /home/wareck/miners/lolminer/./lolMiner --algo ETHASH --pool ethash.unmineable.com --port 3333 --user SHIB:0x345b006F98a231cD846f6a8a8151F9999bBD2f2A.nzxt --worker Rig1 --pass x --ethstratum ETHPROXY --basecolor on"
  14. exit 0
  15. EOF
  16. chmod +x /tmp/lolminer
  17. sudo cp /tmp/lolminer /etc/init.d/lolminer
  18. sudo update-rc.d lolminer defaults