monitoring.monit: get closer to upstream service definition
taken from https://bitbucket.org/tildeslash/monit/src/e02247e0480b19be88e6a908886da83bbb1bc6a3/system/startup/monit.service.in?at=master
This commit is contained in:
@@ -36,11 +36,16 @@ in
|
|||||||
];
|
];
|
||||||
|
|
||||||
systemd.services.monit = {
|
systemd.services.monit = {
|
||||||
description = "Monit system watcher";
|
description = "Pro-active monitoring utility for unix systems";
|
||||||
after = [ "network-interfaces.target" ];
|
after = [ "network.target" ];
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
script = "${pkgs.monit}/bin/monit -I -c /etc/monit.conf";
|
serviceConfig = {
|
||||||
serviceConfig.Restart = "always";
|
ExecStart = "${pkgs.monit}/bin/monit -I -c /etc/monit.conf";
|
||||||
|
ExecStop = "${pkgs.monit}/bin/monit -c /etc/monit.conf quit";
|
||||||
|
ExecReload = "${pkgs.monit}/bin/monit -c /etc/monit.conf reload";
|
||||||
|
KillMode = "process";
|
||||||
|
Restart = "always";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user