Merge fort-nix/nix-bitcoin#653: Revert "clightning: don't cleanup socket on startup"

fc1466e743 Revert "clightning: don't cleanup socket on startup" (Erik Arvstedt)

Pull request description:

ACKs for top commit:
  jonasnick:
    ACK fc1466e743

Tree-SHA512: e4139ef9163fe371964cb8ab668f70dc414ecc5169e3d5d7a0637ef61493d51f1416d878abd21b28d5763e089e00ff10a2e8f30103b488871470ad31dd387025
This commit is contained in:
Jonas Nick 2023-10-09 07:59:29 +00:00
commit 749901b923
No known key found for this signature in database
GPG Key ID: 4861DBF262123605

View File

@ -170,6 +170,11 @@ in {
requires = [ "bitcoind.service" ];
after = [ "bitcoind.service" "nix-bitcoin-secrets.target" ];
preStart = ''
# Remove an existing socket so that `postStart` can detect when when a new
# socket has been created and clightning is ready to accept RPC connections.
# This will no longer be needed when clightning supports systemd startup notifications.
rm -f ${cfg.networkDir}/lightning-rpc
umask u=rw,g=r,o=
{
cat ${configFile}