I have this part in /etc/monit/monitrc for domoticz
Code: Select all
check process domoticz with pidfile /var/run/domoticz.pid
start program = "/etc/init.d/domoticz.sh start"
stop program = "/etc/init.d/domoticz.sh stop"
if failed
url http://127.0.0.1:8080/json.htm?type=command¶m=getversion
and content = '"status" : "OK"'
for 2 cycles
then restart
if 5 restarts within 5 cycles then exec "/sbin/reboot"
Code: Select all
check process mosquitto with pidfile /var/run/mosquitto.pid
start program = "/etc/init.d/mosquitto start"
stop program = "/etc/init.d/mosquitto stop"
What can I do to make this work ?
Note: I run jessie on a raspberryPi 2b