nixos/netdata: enable reload service and add PID file
This commit is contained in:
parent
c3cc7034e2
commit
6e592faa92
@ -141,11 +141,16 @@ in {
|
||||
path = (with pkgs; [ gawk curl ]) ++ lib.optional cfg.python.enable
|
||||
(pkgs.python3.withPackages cfg.python.extraPackages);
|
||||
serviceConfig = {
|
||||
Environment="PYTHONPATH=${pkgs.netdata}/libexec/netdata/python.d/python_modules";
|
||||
ExecStart = "${pkgs.netdata}/bin/netdata -P /run/netdata/netdata.pid -D -c ${configFile}";
|
||||
ExecReload = "${pkgs.utillinux}/bin/kill -s HUP -s USR1 -s USR2 $MAINPID";
|
||||
TimeoutStopSec = 60;
|
||||
# User and group
|
||||
User = cfg.user;
|
||||
Group = cfg.group;
|
||||
Environment="PYTHONPATH=${pkgs.netdata}/libexec/netdata/python.d/python_modules";
|
||||
ExecStart = "${pkgs.netdata}/bin/netdata -D -c ${configFile}";
|
||||
TimeoutStopSec = 60;
|
||||
# Runtime directory and mode
|
||||
RuntimeDirectory = "netdata";
|
||||
RuntimeDirectoryMode = "0755";
|
||||
};
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user