1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-26 05:02:18 +00:00
freebsd-ports/net-mgmt/netmond/files/netmond_watchdog
Sergey Matveychuk b4dd05271c Netmond - IP network monitoring daemon.
PR:		ports/65033
Submitted by:	Viktor Fomichev <vfom@narod.ru>
2004-08-18 17:08:08 +00:00

22 lines
497 B
Bash

#!/bin/sh
#
prefix=/usr/local
exec_prefix=${prefix}
PATH=/bin:/usr/bin
export PATH
pidfile=/var/run/netmond.pid
#config=/usr/home/netmon/netmon.conf
config=/usr/local/etc/netmon.conf
while : ; do
if [ -r $pidfile ] && kill -0 `cat $pidfile` >/dev/null 2>&1 ; then
# echo "Netmond Running"
else
# echo "Netmond failed"
logger -p daemon.err -t nemond_watchdog "Netmond failed. Restarting..."
rm -f ${pidfile}
${exec_prefix}/sbin/netmond -c ${config}
fi
sleep 10
done