Merge pull request #255008 from SuperSandro2000/x-triggers-name
systemd-lib: add name to X-{Reloads,Restart}-Triggers to easily ident…
This commit is contained in:
commit
c6db677b1c
@ -274,7 +274,7 @@ in rec {
|
||||
});
|
||||
in "${out}/bin/${scriptName}";
|
||||
|
||||
unitConfig = { config, options, ... }: {
|
||||
unitConfig = { config, name, options, ... }: {
|
||||
config = {
|
||||
unitConfig =
|
||||
optionalAttrs (config.requires != [])
|
||||
@ -294,9 +294,9 @@ in rec {
|
||||
// optionalAttrs (config.requisite != [])
|
||||
{ Requisite = toString config.requisite; }
|
||||
// optionalAttrs (config ? restartTriggers && config.restartTriggers != [])
|
||||
{ X-Restart-Triggers = "${pkgs.writeText "X-Restart-Triggers" (toString config.restartTriggers)}"; }
|
||||
{ X-Restart-Triggers = "${pkgs.writeText "X-Restart-Triggers-${name}" (toString config.restartTriggers)}"; }
|
||||
// optionalAttrs (config ? reloadTriggers && config.reloadTriggers != [])
|
||||
{ X-Reload-Triggers = "${pkgs.writeText "X-Reload-Triggers" (toString config.reloadTriggers)}"; }
|
||||
{ X-Reload-Triggers = "${pkgs.writeText "X-Reload-Triggers-${name}" (toString config.reloadTriggers)}"; }
|
||||
// optionalAttrs (config.description != "") {
|
||||
Description = config.description; }
|
||||
// optionalAttrs (config.documentation != []) {
|
||||
|
Loading…
Reference in New Issue
Block a user