monitord перезапускает каждую минуту
Добавлено: 2008-10-05 23:10:32
Доброго времени суток!
Вот поставил monitord
monitord.conf
демон monitord
Все работает токо вот отчеты о перезапуске сервисов приходят каждую минуту, подскажите почему?
Вот поставил monitord
monitord.conf
Код: Выделить всё
############################################################################
############################################################################
##
## Monitord Configuration file
##
############################################################################
############################################################################
# You MUST set your email address and the email server to use when sending
# out notices. It will be used if you use the "alert" option below.
email = cancer@domain.ru
smtp-server = localhost
# When specifying options, make sure that they are comma-separated and do NOT
# have any spaces.
#
# user options delay service start script parameters
#root auto,alert 10 inetd /usr/sbin/inetd -wW
#root auto 10 syslogd /usr/sbin/syslogd
#root auto 10 cron /usr/sbin/cron
root auto,alert 59 httpd /usr/local/etc/rc.d/apache2 start
#root auto,alert 10 sshd /usr/local/sbin/sshd
root auto,alert 59 squid /usr/local/etc/rc.d/squid start
root auto,alert 59 samsd /usr/local/etc/rc.d/samsd start
Код: Выделить всё
#!/bin/sh
#
case "$1" in
start)
/usr/local/sbin/monitord > /dev/null 2>&1
echo ' monitord started...'
;;
stop)
if [ `ps axc | grep monitord | awk '{print $1}' \
| tail -1` -ge 0 ] > /dev/null 2>&1
then
kill `ps axc | grep monitord | awk '{print $1}'`
echo ' monitord stopped...'
else
echo ' monitord not running!'
fi
;;
restart)
if [ `ps axc | grep monitord | awk '{print $1}' \
| tail -1` -ge 0 ] > /dev/null 2>&1
then
kill `ps axc | grep monitord | awk '{print $1}'`
echo ' monitord stopped...'
sleep 1
/usr/local/sbin/monitord > /dev/null 2>&1
echo ' monitord started...'
else
echo ' monitord not running!'
fi
;;
*)
echo "Usage: `basename $0` {start|stop|restart}" >&2
exit 64
;;
esac
exit 0
Код: Выделить всё
//>uname -a
FreeBSD proxy.domain.local 7.0-RELEASE FreeBSD 7.0-RELEASE #1: Fri Oct 3 15:42:11 MSD 2008 cancer@proxy.domain.local:/usr/obj/usr/src/sys/kernell.proxy_base i386