Skip to content

Instantly share code, notes, and snippets.

@foxrtb
Last active July 8, 2018 18:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save foxrtb/b703ae761472c5599c4d83ab0d3d62ae to your computer and use it in GitHub Desktop.
Save foxrtb/b703ae761472c5599c4d83ab0d3d62ae to your computer and use it in GitHub Desktop.
paccoin systemd service
#Pipe the conf to systemd path
cat <<EOF > /etc/systemd/system/pacd.service
[Unit]
Description=PAC daemon
After=network.target
[Service]
User=root
Group=root
Type=forking
PIDFile=/root/.paccoincore/paccoind.pid
ExecStart=/root/paccoind -daemon -pid=/root/.paccoincore/paccoind.pid \
-conf=/root/.paccoincore/paccoin.conf -datadir=/root/.paccoincore/
ExecStop=-/root/paccoin-cli -conf=/root/.paccoincore/paccoin.conf \
-datadir=/root/.paccoincore/ stop
Restart=always
PrivateTmp=true
TimeoutStopSec=60s
TimeoutStartSec=2s
StartLimitInterval=120s
StartLimitBurst=5
[Install]
WantedBy=multi-user.target
EOF
#enable the service
systemctl enable pacd.service
#start the service
systemctl start pacd.service
[Unit]
Description=PAC daemon
After=network.target
[Service]
User=root
Group=root
Type=forking
PIDFile=/root/.paccoincore/paccoind.pid
ExecStart=/root/paccoind -daemon -pid=/root/.paccoincore/paccoind.pid \
-conf=/root/.paccoincore/paccoin.conf -datadir=/root/.paccoincore/
ExecStop=-/root/paccoin-cli -conf=/root/.paccoincore/paccoin.conf \
-datadir=/root/.paccoincore/ stop
Restart=always
PrivateTmp=true
TimeoutStopSec=60s
TimeoutStartSec=2s
StartLimitInterval=120s
StartLimitBurst=5
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment