Skip to content

Commit

Permalink
nixos/acme: Fix bash issue, enable debug
Browse files Browse the repository at this point in the history
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.

(cherry picked from commit 514a0b6)
  • Loading branch information
m1cr0man committed Feb 6, 2021
1 parent 93ac91d commit 1f05492
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions nixos/modules/security/acme.nix
Original file line number Diff line number Diff line change
Expand Up @@ -271,13 +271,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
Expand Down

0 comments on commit 1f05492

Please sign in to comment.