From db9dbc5f3100b40df6d7509f56d8d4562c284b72 Mon Sep 17 00:00:00 2001 From: Erik De Smedt Date: Wed, 5 Jul 2023 17:11:25 +0200 Subject: [PATCH] Remove --daemon from lightningd.service When the `--daemon` flag is used, `lightningd` requires that `--log-file` is used as well. By consequence, the `lightningd.service` didn't work out-of-the-box for me. This changes also sends the logs to `journald`. The new approach is consistent with the `bitcoind.service` file in the bitcoin-core repository. I prefer this approach because it comes with automatic log-rotation. --- contrib/init/lightningd.service | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/init/lightningd.service b/contrib/init/lightningd.service index 6973d86d0..fa3e6dfa2 100644 --- a/contrib/init/lightningd.service +++ b/contrib/init/lightningd.service @@ -15,7 +15,7 @@ Wants=network-online.target After=network-online.target [Service] -ExecStart=/usr/bin/lightningd --daemon --conf /etc/lightningd/lightningd.conf --pid-file=/run/lightningd/lightningd.pid +ExecStart=/usr/bin/lightningd --conf /etc/lightningd/lightningd.conf --pid-file=/run/lightningd/lightningd.pid # Creates /run/lightningd owned by bitcoin RuntimeDirectory=lightningd @@ -24,7 +24,7 @@ ConfigurationDirectory=lightningd User=bitcoin Group=bitcoin -Type=forking +Type=simple PIDFile=/run/lightningd/lightningd.pid Restart=on-failure