nixos/acme: implement postRun using ExecStartPost
In 5532065d0690645f0a813fed6e68163b0f4774d4, acme was changed to be RemainAfterExit=true, but `postRun` commands are implemented as `ExecStopPost`. Systemd now considers the service to be still running after simp_le is finished, so won't run these commands (e.g. to reload certificates in a webserver). Change `postRun` to use `ExecStartPost` to ensure the commands are run in a timely manner.
This commit is contained in:
parent
05caa97701
commit
83972b80b4
@ -241,9 +241,9 @@ in
|
|||||||
StateDirectoryMode = rights;
|
StateDirectoryMode = rights;
|
||||||
WorkingDirectory = "/var/lib/${lpath}";
|
WorkingDirectory = "/var/lib/${lpath}";
|
||||||
ExecStart = "${pkgs.simp_le}/bin/simp_le ${escapeShellArgs cmdline}";
|
ExecStart = "${pkgs.simp_le}/bin/simp_le ${escapeShellArgs cmdline}";
|
||||||
ExecStopPost =
|
ExecStartPost =
|
||||||
let
|
let
|
||||||
script = pkgs.writeScript "acme-post-stop" ''
|
script = pkgs.writeScript "acme-post-start" ''
|
||||||
#!${pkgs.runtimeShell} -e
|
#!${pkgs.runtimeShell} -e
|
||||||
${data.postRun}
|
${data.postRun}
|
||||||
'';
|
'';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user