Title: Here's a Ubuntu 13.04 UpStart script to start Slush's stratum proxy Post by: h@shKraker on July 26, 2013, 04:29:12 PM 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. |