improve lbrycrdd service file

inspired by #370  and https://github.com/lbryio/lbrycrd/blob/master/contrib/init/bitcoind.service
This commit is contained in:
Alex Grintsvayg 2022-02-08 10:32:27 -05:00
parent 158c49b58f
commit 2098f6bbba
No known key found for this signature in database
GPG key ID: AEB3F089F86A22B5

View file

@ -40,13 +40,19 @@ Description="LBRYcrd daemon"
After=network.target
[Service]
ExecStart=/home/<your_user>/lbrycrdd -datadir="/home/<your_user>/.lbrycrd" -pid="/home/<your_user>/pid"
ExecStart=/home/<your_user>/lbrycrdd -datadir="/home/<your_user>/.lbrycrd" -pid="/run/lbrycrdd/lbrycrdd.pid"
# Creates /run/lbrycrdd
RuntimeDirectory=lbrycrdd
Type=Forking
PIDFile=/home/<your_user>/.lbrycrd/pid
User=<your_user>
Group=<your_user_group>
PIDFile=/run/lbrycrdd/lbrycrdd.pid
Restart=on-failure
KillMode=process
# hardening
PrivateTmp=true
ProtectSystem=full
NoNewPrivileges=true
PrivateDevices=true
MemoryDenyWriteExecute=true
[Install]
WantedBy=multi-user.target