From eaaa6b87013b06e91c4bb24d703c603a755f1dd7 Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Thu, 9 Jan 2020 14:27:45 +0100 Subject: [PATCH] clightning: update to v0.8.0 To continue using inotify would be too complicated because we would also need to monitor the creation of the 'bitcoin' subdirectory. --- modules/clightning.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/clightning.nix b/modules/clightning.nix index 5b7b15b..9a561c3 100644 --- a/modules/clightning.nix +++ b/modules/clightning.nix @@ -92,7 +92,7 @@ in { # give group read access to allow using lightning-cli chmod u=rw,g=r,o= ${cfg.dataDir}/config # The RPC socket has to be removed otherwise we might have stale sockets - rm -f ${cfg.dataDir}/lightning-rpc + rm -f ${cfg.dataDir}/bitcoin/lightning-rpc echo "bitcoin-rpcpassword=$(cat ${config.nix-bitcoin.secretsDir}/bitcoin-rpcpassword)" >> '${cfg.dataDir}/config' ''; serviceConfig = { @@ -108,8 +108,9 @@ in { ); # Wait until the rpc socket appears postStart = '' - while read f; do [[ $f == lightning-rpc ]] && break; done \ - < <(${pkgs.inotifyTools}/bin/inotifywait --quiet --monitor -e create,moved_to --format '%f' '${cfg.dataDir}') + while [[ ! -e ${cfg.dataDir}/bitcoin/lightning-rpc ]]; do + sleep 0.1 + done ''; }; };