systemd compatability
tuwid opened this issue · comments
In the examples the start and stop use the init.d but on servers with systemd if you use the init script the
pid doesnt get updated so when you do a service status you get the status of the service dead
/etc/monit/monitrc.d/rsyslog
check process rsyslogd with pidfile /var/run/rsyslogd.pid
group system
group rsyslogd
start program = "/etc/init.d/rsyslog start"
stop program = "/etc/init.d/rsyslog stop"
if 5 restarts with 5 cycles then timeout
This can be easily fixed by updating the start and stop with
start program = "/bin/systemctl start rsyslog"
stop program = "/bin/systemctl stop rsyslog"