From ce10003747c77e8f075359fe82ca6d0a435ff90c Mon Sep 17 00:00:00 2001 From: Jonas Nick Date: Thu, 8 Jul 2021 13:10:16 +0000 Subject: [PATCH] lnd: allow curl to retry in the create-wallet script --- modules/lnd.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/lnd.nix b/modules/lnd.nix index 89a67c8..950b3b0 100644 --- a/modules/lnd.nix +++ b/modules/lnd.nix @@ -198,7 +198,10 @@ in { RestartSec = "10s"; ReadWritePaths = cfg.dataDir; ExecStartPost = let - curl = "${pkgs.curl}/bin/curl -s --show-error"; + # Retrying is necessary because it can happen that the lnd socket is + # existing, but the RPC service isn't yet, which results in error + # "waiting to start, RPC services not available". + curl = "${pkgs.curl}/bin/curl -s --show-error --retry 10"; restUrl = "https://${cfg.restAddress}:${toString cfg.restPort}/v1"; in [ (nbLib.script "lnd-create-wallet" ''