Advertisement
zeronic

Stratum UpStart Script

Oct 7th, 2012
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. description "Stratum Mining Proxy"
  2. author TheSeven
  3. start on filesystem
  4. stop on runlevel [!2345]
  5. start on started stratum
  6. stop on stopped stratum
  7. oom never
  8. expect daemon
  9. respawn
  10. respawn limit 10 60 # 10 times in 60 seconds
  11. kill timeout 120
  12.  
  13. script
  14. # Application Username
  15. user=fpga
  16. # Installation Directory
  17. basedir=/home/$user/stratum
  18. # Python Directory
  19. python=/usr/bin/python
  20. # Script Name
  21. script=mining_proxy.py
  22. # Stratum Pool Server Address
  23. host=stratum.btcguild.com
  24. # Stratum Pool Server Port
  25. port=9332
  26. # Application PID File
  27. pidfile=$basedir/mining-proxy.pid
  28. # Don't change anything below here unless you know what you're doing
  29. [[ -e $pidfile && ! -d "/proc/$(cat $pidfile)" ]] && rm $pidfile
  30. [[ -e $pidfile && "$(cat /proc/$(cat $pidfile)/cmdline)" != $cmd* ]] && rm $pidfile
  31. exec start-stop-daemon --start -c $user --chdir $basedir --pidfile $pidfile --startas $python -b -m -- $script -o $host -p $port
  32. end script
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement