Closed sicksvt closed 9 years ago
I'm unsure if sudo is necessary in your command, if you have correct permissions you should be fine, but none the less here it is, I use screen and a script so I can attach and detach from the verbose stratum output.
cd /path/to/stratum-mining && su root -c 'screen -S Name-of-screen -d -m twistd -ny launcher.tac'
save that to /usr/bin/, call it for example stratumlaunch.sh, then run: chmod -x /usr/bin/stratumlaunch.sh
After that, you will be able to from any directory just type stratumlaunch.sh and it will run! To then check if the screen is running, screen -list to attach to the screen and view it's output, screen -x Name-of-screen and to exit the screen without killing the instance, hold control and press a then d to close the stratum instance and screen, hold control and hit c
If you want to launch multiple stratum instances from this one coin, simply add another line to the bottom of the file and replace the path to the new instance and the name of the screen. wallah you have an auto run script capable of launching multiple instances. Alternatively, If you do not want to run it in a screen and have no verbose monitoring. use this line instead:
cd /path/to/stratum-mining && su root -c 'twistd -y launcher.tac'
There is probably different ways to do this, but I find this the easiest simply because I host close to 25 coins on my pools.
Thank you, this works for me.
I've actually patched this already in the MaxCoin branch. We need to work on merging it into master IMHO.
Is there a way to launch the application without first changing to the stratum-mining directory?
This works: cd stratum-mining sudo twistd -y launcher.tac
But I am wondering if something like this can be done: sudo twistd -y ./stratum-mining/launcher.tac
I looked up documentation for twistd and found a couple of params that looked like they might be for providing a working directory but I am not having any luck with them. I appreciate any advice you can give. Thanks.