nixos/acme: Fix broken post-stop script
Previously the script would contain an empty `if` block (which is invalid syntax) if both `data.activationDelay == null` and `data.postRun == ""`. Fix this by adding a no-op `true`.
This commit is contained in:
parent
7139c65c88
commit
7d68eadf37
@ -257,7 +257,7 @@ in
|
|||||||
|
|
||||||
if [ -e /tmp/lastExitCode ] && [ "$(cat /tmp/lastExitCode)" = "0" ]; then
|
if [ -e /tmp/lastExitCode ] && [ "$(cat /tmp/lastExitCode)" = "0" ]; then
|
||||||
${if data.activationDelay != null then ''
|
${if data.activationDelay != null then ''
|
||||||
|
|
||||||
${data.preDelay}
|
${data.preDelay}
|
||||||
|
|
||||||
if [ -d '${lpath}' ]; then
|
if [ -d '${lpath}' ]; then
|
||||||
@ -266,6 +266,10 @@ in
|
|||||||
systemctl --wait start acme-setlive-${cert}.service
|
systemctl --wait start acme-setlive-${cert}.service
|
||||||
fi
|
fi
|
||||||
'' else data.postRun}
|
'' else data.postRun}
|
||||||
|
|
||||||
|
# noop ensuring that the "if" block is non-empty even if
|
||||||
|
# activationDelay == null and postRun == ""
|
||||||
|
true
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
|
|
||||||
@ -294,7 +298,7 @@ in
|
|||||||
chown '${data.user}:${data.group}' '${cpath}'
|
chown '${data.user}:${data.group}' '${cpath}'
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
script =
|
script =
|
||||||
''
|
''
|
||||||
workdir="$(mktemp -d)"
|
workdir="$(mktemp -d)"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user