Bitcoin Forum
December 12, 2017, 10:11:25 PM *
News: Latest stable version of Bitcoin Core: 0.15.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Here's a Ubuntu 13.04 UpStart script to start Slush's stratum proxy  (Read 1347 times)
h@shKraker
Sr. Member
****
Offline Offline

Activity: 402


View Profile
July 26, 2013, 04:29:12 PM
 #1

Thanks for reading my post.  Last night I got bored and decided to write an UpStart script (which you put in /etc/init) that will start Slush's stratum proxy at machine startup.  First things first, you got have Slush's proxy installed, by getting it at https://github.com/slush0/stratum-mining-proxy/,  on your Ubuntu 13.04 box and you MUST verify it will run successfully as the unprivileged user you intend to start it as.  I've decided to install my stratum proxy at /opt/BtcUser/StratumProxy and run the script as the user BtcUser .  Once you have it installed you create an upstart script in /etc/init named SlushStratupProxy.conf  (aka the full path is /etc/init/SlushStratupProxy.conf) with this as its contents ->

# Straum proxy autostart script
#
#

description     "Straum proxy autostart script"
author "H@shKraker"
 
start on runlevel [2345]
stop on runlevel [!2345]
 
# Automtically respawn
respawn                 # restart when job dies
respawn limit 99      # give up restart after 99 respawns in 5 seconds

expect fork
setgid BtcUser
setuid BtcUser

chdir /opt/BtcUser/StratumProxy

pre-start script

end script

script

     exec /opt/BtcUser/StratumProxy/mining_proxy.py -o stratum.triplemining.com -p 3334

end script


###################

To test that the script works you can type "sudo start SlushStratupProxy" and it should start just fine, and then "sudo stop SlushStratupProxy" to stop the job.

Tips/Payments: 1HaZvsUjJpcAf76QWg7Muu4mnWRWCrRNMs
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!