git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #39680 from bgamari/fix-acme-post-stop

nixos/acme: Fix broken post-stop script

commit11df600bf8975a9e1e471f4541321dc6f352a912 authorMatthew Justin Bauer <mjbauer95@gmail.com> dateMon 7 May 2018, 04:19 (9 years ago) parent2b499af7d68ead
1 file changed+6−2
nixos/modules/security/acme.nix+6−2
nixos/modules/security/acme.nix+6−2
@@ -257,7 +257,7 @@ in
257257
258258 if [ -e /tmp/lastExitCode ] && [ "$(cat /tmp/lastExitCode)" = "0" ]; then
259259 ${if data.activationDelay != null then ''
260−
260+
261261 ${data.preDelay}
262262
263263 if [ -d '${lpath}' ]; then
@@ -266,6 +266,10 @@ in
266266 systemctl --wait start acme-setlive-${cert}.service
267267 fi
268268 '' else data.postRun}
269+
270+ # noop ensuring that the "if" block is non-empty even if
271+ # activationDelay == null and postRun == ""
272+ true
269273 fi
270274 '';
271275
@@ -294,7 +298,7 @@ in
294298 chown '${data.user}:${data.group}' '${cpath}'
295299 fi
296300 '';
297− script =
301+ script =
298302 ''
299303 workdir="$(mktemp -d)"
300304