nixos/acme: add an option for reloading systemd services after renewal
This commit is contained in:
parent
c85680db4f
commit
942f57e79b
@ -314,6 +314,9 @@ let
|
||||
if [ -e renewed ]; then
|
||||
rm renewed
|
||||
${data.postRun}
|
||||
${optionalString (data.reloadServices != [])
|
||||
"systemctl --no-block try-reload-or-restart ${escapeShellArgs data.reloadServices}"
|
||||
}
|
||||
fi
|
||||
'');
|
||||
};
|
||||
@ -474,6 +477,15 @@ let
|
||||
description = "Group running the ACME client.";
|
||||
};
|
||||
|
||||
reloadServices = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [];
|
||||
description = ''
|
||||
The list of systemd services to call <code>systemctl try-reload-or-restart</code>
|
||||
on.
|
||||
'';
|
||||
};
|
||||
|
||||
postRun = mkOption {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
|
Loading…
Reference in New Issue
Block a user