Commit 040f7d0b authored by Adam Wujek's avatar Adam Wujek 💬

rootfs: print which process caused monit to trigger restart

Add simple wrapper for monit to print which process caused monit to trigger
restart.
Signed-off-by: Adam Wujek's avatarAdam Wujek <adam.wujek@cern.ch>
parent c0bbff74
#!/bin/sh
# simple wrapper for monit to announce reboot to console
echo "Monit triggered reboot due to $1" > /dev/console
/sbin/reboot
......@@ -2,4 +2,4 @@
start program = "/etc/init.d/dropbear start"
stop program = "/etc/init.d/dropbear stop"
if failed host localhost port 22 type tcp then restart
if 5 restarts within 10 cycles then exec "/sbin/reboot"
if 5 restarts within 10 cycles then exec "/etc/init.d/reboot.sh dropbear"
......@@ -2,4 +2,4 @@
start program = "/etc/init.d/lighttpd.sh start"
stop program = "/etc/init.d/lighttpd.sh stop"
if failed host localhost port 80 type tcp then restart
if 5 restarts within 10 cycles then exec "/sbin/reboot"
if 5 restarts within 10 cycles then exec "/etc/init.d/reboot.sh lighttpd"
check process snmpd with pidfile /var/run/snmpd.pid
start program = "/etc/init.d/snmpd start"
stop program = "/etc/init.d/snmpd stop"
if 5 restart within 10 cycles then exec "/sbin/reboot"
if 5 restart within 10 cycles then exec "/etc/init.d/reboot.sh snmpd"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment