diff --git a/modules/bitcoind.nix b/modules/bitcoind.nix index 3ca5c2a..e2365ab 100644 --- a/modules/bitcoind.nix +++ b/modules/bitcoind.nix @@ -374,11 +374,11 @@ in { cd ${cfg.cli}/bin echo "Importing node banlist..." cat ${./banlist.cli.txt} | while read line; do - if ! err=$(eval "$line" 2>&1) && [[ $err != *already\ banned* ]]; then - # unexpected error - echo "$err" - exit 1 - fi + if ! err=$(eval "$line" 2>&1) && [[ $err != *already\ banned* ]]; then + # unexpected error + echo "$err" + exit 1 + fi done ''; serviceConfig = nbLib.defaultHardening // { diff --git a/modules/lnd.nix b/modules/lnd.nix index bdac2f3..9b49ca1 100644 --- a/modules/lnd.nix +++ b/modules/lnd.nix @@ -207,8 +207,8 @@ in { (nbLib.script "lnd-create-wallet" '' attempts=250 while ! { exec 3>/dev/tcp/${cfg.restAddress}/${toString cfg.restPort} && exec 3>&-; } &>/dev/null; do - ((attempts-- == 0)) && { echo "lnd REST service unreachable"; exit 1; } - sleep 0.1 + ((attempts-- == 0)) && { echo "lnd REST service unreachable"; exit 1; } + sleep 0.1 done if [[ ! -f ${networkDir}/wallet.db ]]; then diff --git a/modules/secrets/secrets.nix b/modules/secrets/secrets.nix index 30618e8..64a0554 100644 --- a/modules/secrets/secrets.nix +++ b/modules/secrets/secrets.nix @@ -110,17 +110,17 @@ in ''} setupSecret() { - file="$1" - user="$2" - group="$3" - permissions="$4" - if [[ ! -e $file ]]; then - echo "Error: Secret file '$file' is missing" - exit 1 - fi - chown "$user:$group" "$file" - chmod "$permissions" "$file" - processedFiles+=("$file") + file="$1" + user="$2" + group="$3" + permissions="$4" + if [[ ! -e $file ]]; then + echo "Error: Secret file '$file' is missing" + exit 1 + fi + chown "$user:$group" "$file" + chmod "$permissions" "$file" + processedFiles+=("$file") } dir="${cfg.secretsDir}"