nixos/nagios: replace deprecated usage of PermissionsStartOnly

see #53852
This commit is contained in:
Aaron Andersen 2019-05-25 10:33:58 -04:00
parent 609c1580d8
commit c2f8d6334c

View file

@ -149,7 +149,6 @@ in
description = "Nagios user ";
uid = config.ids.uids.nagios;
home = nagiosState;
createHome = true;
group = "nagios";
};
@ -175,14 +174,10 @@ in
Group = "nagios";
Restart = "always";
RestartSec = 2;
PermissionsStartOnly = true;
LogsDirectory = "nagios";
StateDirectory = "nagios";
};
preStart = ''
mkdir -m 0755 -p ${nagiosState} ${nagiosLogDir}
chown -R nagios:nagios ${nagiosState} ${nagiosLogDir}
'';
script = ''
for i in ${toString cfg.plugins}; do
export PATH=$i/bin:$i/sbin:$i/libexec:$PATH