parent
4dd5c93998
commit
609c1580d8
|
@ -36,7 +36,7 @@ let
|
||||||
|
|
||||||
# Uid/gid that the daemon runs under.
|
# Uid/gid that the daemon runs under.
|
||||||
nagios_user=nagios
|
nagios_user=nagios
|
||||||
nagios_group=nogroup
|
nagios_group=nagios
|
||||||
|
|
||||||
# Misc. options.
|
# Misc. options.
|
||||||
illegal_macro_output_chars=`~$&|'"<>
|
illegal_macro_output_chars=`~$&|'"<>
|
||||||
|
@ -150,8 +150,11 @@ in
|
||||||
uid = config.ids.uids.nagios;
|
uid = config.ids.uids.nagios;
|
||||||
home = nagiosState;
|
home = nagiosState;
|
||||||
createHome = true;
|
createHome = true;
|
||||||
|
group = "nagios";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
users.groups.nagios = { };
|
||||||
|
|
||||||
# This isn't needed, it's just so that the user can type "nagiostats
|
# This isn't needed, it's just so that the user can type "nagiostats
|
||||||
# -c /etc/nagios.cfg".
|
# -c /etc/nagios.cfg".
|
||||||
environment.etc = [
|
environment.etc = [
|
||||||
|
@ -169,6 +172,7 @@ in
|
||||||
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
User = "nagios";
|
User = "nagios";
|
||||||
|
Group = "nagios";
|
||||||
Restart = "always";
|
Restart = "always";
|
||||||
RestartSec = 2;
|
RestartSec = 2;
|
||||||
PermissionsStartOnly = true;
|
PermissionsStartOnly = true;
|
||||||
|
@ -176,7 +180,7 @@ in
|
||||||
|
|
||||||
preStart = ''
|
preStart = ''
|
||||||
mkdir -m 0755 -p ${nagiosState} ${nagiosLogDir}
|
mkdir -m 0755 -p ${nagiosState} ${nagiosLogDir}
|
||||||
chown nagios ${nagiosState} ${nagiosLogDir}
|
chown -R nagios:nagios ${nagiosState} ${nagiosLogDir}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
script = ''
|
script = ''
|
||||||
|
|
Loading…
Reference in New Issue