mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2025-01-02 17:09:09 +03:00
nixos/acme: implement postRun using ExecStartPost
In 5532065d06
, 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;
|
||||
WorkingDirectory = "/var/lib/${lpath}";
|
||||
ExecStart = "${pkgs.simp_le}/bin/simp_le ${escapeShellArgs cmdline}";
|
||||
ExecStopPost =
|
||||
ExecStartPost =
|
||||
let
|
||||
script = pkgs.writeScript "acme-post-stop" ''
|
||||
script = pkgs.writeScript "acme-post-start" ''
|
||||
#!${pkgs.runtimeShell} -e
|
||||
${data.postRun}
|
||||
'';
|
||||
|
Loading…
Reference in New Issue
Block a user