conformal/btcd — pull request #188 by peerchemist (2014-12-02 13:23:12+00:00)
Title: Example .service file for systemd integration

[Unit]
Description=PPCD
After=network.target
## It will conflict ppcoind for port 9901, so this will stop ppcoind.service before starting ppcd.service
Conflicts=ppcoind.service

[Install]
WantedBy=multi-user.target

[Service]
## Running this in sandbox as separate user is prefered
User=ppcd
Group=ppcd
Restart=always
RestartSec=15
PIDFile=/run/ppcd/ppcd.pid
## In this example, home directory for ppcd user is /var/lib/ppcd and that is datadir for ppcd
ExecStart=/usr/bin/ppcd \
--configfile=/etc/ppcd/ppcd.conf \
--datadir=/var/lib/ppcd \
--debuglevel=info
## Systemd sandbox features, proved to work.
PrivateTmp=true
PrivateDevices=yes
ProtectSystem=full
ProtectHome=yes
NoNewPrivileges=yes