From 514a0b6d8adf9fa181549dd0ae5c52ee04846975 Mon Sep 17 00:00:00 2001 From: Lucas Savva Date: Tue, 12 Jan 2021 19:11:50 +0000 Subject: [PATCH] nixos/acme: Fix bash issue, enable debug I found a logical error in the bash script, but during debugging I enabled command echoing and realised it would be a good idea to have it enabled all the time for ease of bug reporting. --- nixos/modules/security/acme.nix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/nixos/modules/security/acme.nix b/nixos/modules/security/acme.nix index b0f2f7265c5..6b62e5043ca 100644 --- a/nixos/modules/security/acme.nix +++ b/nixos/modules/security/acme.nix @@ -272,13 +272,12 @@ let # Working directory will be /tmp script = '' - set -euo pipefail + set -euxo pipefail ${optionalString (data.webroot != null) '' # Ensure the webroot exists mkdir -p '${data.webroot}/.well-known/acme-challenge' - chown 'acme:${data.group}' ${data.webroot}/{.well-known,.well-known/acme-challenge} \ - || echo "Please fix the permissions under ${data.webroot}/.well-known/acme-challenge" && exit 1 + chown 'acme:${data.group}' ${data.webroot}/{.well-known,.well-known/acme-challenge} ''} echo '${domainHash}' > domainhash.txt