lnd: allow curl to retry in the create-wallet script

This commit is contained in:
Jonas Nick 2021-07-08 13:10:16 +00:00
parent a23b9d1c2d
commit ce10003747
No known key found for this signature in database
GPG Key ID: 4861DBF262123605
1 changed files with 4 additions and 1 deletions

View File

@ -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" ''