Post
Topic
Board Pools
Re: [600 TH] p2pool: Decentralized, DoS-resistant, Hop-Proof pool
by
hamburgerhelper
on 26/08/2014, 01:50:20 UTC
This may not be too useful since most people don't run CentOS7 / RHEL7, but here's a systemd script to run the RelayNodeClient application. Systemd has the very nice feature that it will restart the process if it dies, and all stdout messages can be monitored with "journalctl -f -u relaynodeclient". Put the text below into a file such as: /etc/systemd/system/relaynodeclient.service

Then change the following to appropriate values:

Change to the name of your bitcoind systemd unit file:
Code:
After=bitcoin.service

Change to the name of your relaynodeclient user and group:
Code:
User=YOURRELAYUSER
Group=YOURRELAYGROUP

Change to the Relay Network region closest to your p2pool node:
Code:
ExecStart=/bin/java -Xmx100m -jar /PATH/TO/RelayNodeClient.jar public.YOURRELAYREGION.relay.mattcorallo.com 127.0.0.1:8333

Code:
[Unit]
Description=relaynodeclient
After=network.target
After=bitcoin.service

[Service]
Type=simple
User=YOURRELAYUSER
Group=YOURRELAYGROUP
ExecStart=/bin/java -Xmx100m -jar /PATH/TO/RelayNodeClient.jar public.YOURRELAYREGION.relay.mattcorallo.com 127.0.0.1:8333
Restart=always

[Install]
WantedBy=multi-user.target

*Edited to add Matt's suggestion of limiting java's heap space to 100 MB to conserve RAM.