systemd module: Add OnFailure to systemd common unit options
This commit is contained in:
parent
88f5cfc126
commit
b9291616a6
@ -170,6 +170,15 @@ in rec {
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
onFailure = mkOption {
|
||||||
|
default = [];
|
||||||
|
type = types.listOf types.str;
|
||||||
|
description = ''
|
||||||
|
A list of one or more units that are activated when
|
||||||
|
this unit enters the "failed" state.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -199,6 +199,8 @@ let
|
|||||||
{ X-Restart-Triggers = toString config.restartTriggers; }
|
{ X-Restart-Triggers = toString config.restartTriggers; }
|
||||||
// optionalAttrs (config.description != "") {
|
// optionalAttrs (config.description != "") {
|
||||||
Description = config.description;
|
Description = config.description;
|
||||||
|
} // optionalAttrs (config.onFailure != []) {
|
||||||
|
OnFailure = toString config.onFailure;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user