freebsd-ports/net-mgmt/netmond/files/netmond_watchdog.in
Rong-En Fan 35bd14c7a1 - Add a PIPE method (see README for details)
- Use USE_RC_SUBR for rc scripts
- Use SUB_FILES to simplify
- Update pkg-descr

PR:		ports/105564
Submitted by:	Viktor Fomichev <vfom at narod.ru> (maintainer)
2006-11-29 13:29:09 +00:00

18 lines
417 B
Bash

#!/bin/sh
PATH=/bin:/usr/bin
export PATH
pidfile=/var/run/netmond.pid
config=%%PREFIX%%/etc/netmond.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 netmond_watchdog "Netmond failed. Restarting..."
rm -f ${pidfile}
%%PREFIX%%/sbin/netmond -c ${config}
fi
sleep 10
done