From 08759225a6c0b0654a87743b19a96f235333d109 Mon Sep 17 00:00:00 2001 From: Aleksei Kharlamov Date: Fri, 10 Dec 2021 01:50:40 +0100 Subject: [PATCH] wallet-server: update suggested systemd unit Use `Type=Forking`. By default, `Type=Simple` is used and it expects that the daemon stays forking in the foreground. However, lbrycrdd does the opposite and forks/goes to background. This confuses systemd a little bit: ``` Dec 09 10:30:28 lbry.devass.club systemd[1]: lbrycrdd.service: Unit process 12237 (lbrycrdd) remains running after unit stopped. ``` So basically it thinks that the unit stops working instantly. When the correct type is used, systemd should be able to handle this situations, along with restarts, properly. See also: [AUR systemd service](https://aur.archlinux.org/cgit/aur.git/tree/lbrycrd.service?h=lbrycrd) --- documents/resources/wallet-server.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/documents/resources/wallet-server.md b/documents/resources/wallet-server.md index b33413f..88745e3 100644 --- a/documents/resources/wallet-server.md +++ b/documents/resources/wallet-server.md @@ -40,7 +40,9 @@ Description="LBRYcrd daemon" After=network.target [Service] -ExecStart=/home//lbrycrdd -datadir="/home//.lbrycrd" +ExecStart=/home//lbrycrdd -datadir="/home//.lbrycrd" -pid="/home//pid" +Type=Forking +PIDFile=/home//.lbrycrd/pid User= Group= Restart=on-failure