Skip to content

Commit

Permalink
Remove --daemon from lightningd.service
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ErikDeSmedt committed Jul 5, 2023
1 parent 910630c commit 4b9c05a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions contrib/init/lightningd.service
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -24,7 +24,7 @@ ConfigurationDirectory=lightningd

User=bitcoin
Group=bitcoin
Type=forking
Type=simple
PIDFile=/run/lightningd/lightningd.pid
Restart=on-failure

Expand Down

0 comments on commit 4b9c05a

Please sign in to comment.