#!/bin/sh
LOGFILE=/www/addons/watchdog/rfd_log.txt
if [ ! -f "$LOGFILE" ]
then
echo "*** rfd_log ***" >> $LOGFILE
fi
#check /bin/rfd
if ps ax | grep -v grep | grep "/bin/rfd" > /dev/null
then
echo "/bin/rfd is running. OK"
#echo "$(date "+%Y%m%d %T") : rfd OK" >> $LOGFILE
else
echo "/bin/rfd not running. Try to start it..."
echo "$(date "+%Y%m%d %T") : rfd ERROR" >> $LOGFILE
/bin/rfd -d -f /etc/config/rfd.conf -l 1
fi