I’m trying to make a monit check that reboots my router if it looses network connection. But I do not want it to reboot withing the first 5 minutes after boot, no mater if net is up or down. So far I have this:
CHECK HOST ping-or-nuke ADDRESS 220.127.116.11 start program = "/bin/sleep 300" with timeout 305 seconds if failed ping4 for 4 cycles then exec "/sbin/reboot" onreboot start
But it seems to fire the reboot very fast after boot if the net is not there, it “ignores” my attempt to add the 5 minute delay.
I think the check is already in start state when monit loads, but I’m not sure this is the cause.