#!/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