2018-02-23 08:03:00 +00:00
|
|
|
#!/bin/sh
|
|
|
|
# Nico Schottelius, 2018-02-22
|
|
|
|
# Copyright ungleich glarus ag
|
|
|
|
|
|
|
|
if [ $# -ne 1 ]; then
|
|
|
|
echo "$0: toremove"
|
|
|
|
echo "f.i. osd.17 or mon.server4"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
to_monitor=$1
|
|
|
|
|
|
|
|
conf="/etc/monit/conf.d/$to_monitor"
|
|
|
|
|
2018-05-30 11:57:04 +00:00
|
|
|
|
|
|
|
monit stop "$to_monitor"
|
|
|
|
sleep 1
|
|
|
|
|
2018-02-23 08:03:00 +00:00
|
|
|
rm -f "$conf"
|
2018-05-30 11:57:04 +00:00
|
|
|
/etc/init.d/monit restart
|