Bitcoin Forum
June 25, 2024, 09:27:13 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Here's a Ubuntu 13.04 UpStart script to start Slush's stratum proxy  (Read 1467 times)
h@shKraker (OP)
Sr. Member
****
Offline Offline

Activity: 403
Merit: 250


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:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!