Revert "clightning: don't cleanup socket on startup"

Also, add a detailed comment.

Without this commit, clightning client services may fail to start
due to clightning RPC connection failures.
This commit is contained in:
Erik Arvstedt 2023-10-08 21:39:11 +02:00
parent 29a32ac53b
commit fc1466e743
No known key found for this signature in database
GPG Key ID: 33312B944DD97846

View File

@ -170,6 +170,11 @@ in {
requires = [ "bitcoind.service" ];
after = [ "bitcoind.service" ];
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}