From 2098f6bbbac01bbb8ae4f4e26d976df4dde0999f Mon Sep 17 00:00:00 2001 From: Alex Grintsvayg Date: Tue, 8 Feb 2022 10:32:27 -0500 Subject: [PATCH] improve lbrycrdd service file inspired by #370 and https://github.com/lbryio/lbrycrd/blob/master/contrib/init/bitcoind.service --- documents/resources/wallet-server.md | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/documents/resources/wallet-server.md b/documents/resources/wallet-server.md index 88745e3..025bbf9 100644 --- a/documents/resources/wallet-server.md +++ b/documents/resources/wallet-server.md @@ -40,13 +40,19 @@ Description="LBRYcrd daemon" After=network.target [Service] -ExecStart=/home//lbrycrdd -datadir="/home//.lbrycrd" -pid="/home//pid" +ExecStart=/home//lbrycrdd -datadir="/home//.lbrycrd" -pid="/run/lbrycrdd/lbrycrdd.pid" +# Creates /run/lbrycrdd +RuntimeDirectory=lbrycrdd Type=Forking -PIDFile=/home//.lbrycrd/pid -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