mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-16 06:29:17 +03:00
nixos/vector: add graceful shutdown limit option (#414311)
This commit is contained in:
commit
645c320e9b
1 changed files with 10 additions and 1 deletions
|
@ -22,6 +22,15 @@ in
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
gracefulShutdownLimitSecs = lib.mkOption {
|
||||||
|
type = lib.types.ints.positive;
|
||||||
|
default = 60;
|
||||||
|
description = ''
|
||||||
|
Set the duration in seconds to wait for graceful shutdown after SIGINT or SIGTERM are received.
|
||||||
|
After the duration has passed, Vector will force shutdown.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
settings = lib.mkOption {
|
settings = lib.mkOption {
|
||||||
type = (pkgs.formats.json { }).type;
|
type = (pkgs.formats.json { }).type;
|
||||||
default = { };
|
default = { };
|
||||||
|
@ -56,7 +65,7 @@ in
|
||||||
'';
|
'';
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
ExecStart = "${lib.getExe cfg.package} --config ${validateConfig conf}";
|
ExecStart = "${lib.getExe cfg.package} --config ${validateConfig conf} --graceful-shutdown-limit-secs ${builtins.toString cfg.gracefulShutdownLimitSecs}";
|
||||||
DynamicUser = true;
|
DynamicUser = true;
|
||||||
Restart = "always";
|
Restart = "always";
|
||||||
StateDirectory = "vector";
|
StateDirectory = "vector";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue