Last active
July 8, 2018 18:05
-
-
Save foxrtb/b703ae761472c5599c4d83ab0d3d62ae to your computer and use it in GitHub Desktop.
paccoin systemd service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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