#!/bin/sh
if ps x |grep -v grep |grep -c CCcam.mipsel >/dev/null
then
if wget
[Only registered and activated users can see links. Click Here To Register...] -O /opt/var/www/index.html
then
rm /opt/var/www/index.html
echo "$(date +%d-%m-%Y_%H:%M:%S) CCcam OK." >> /opt/var/etc/cam_check.log
else
echo "$(date +%d-%m-%Y_%H:%M:%S) CCcam Restarted." >> /opt/var/etc/cam_check.log
killall CCcam.mipsel
/opt/var/bin/./start_CCcam
fi
else
echo "$(date +%d-%m-%Y_%H:%M:%S) CCcam Started." >> /opt/var/etc/cam_check.log
killall CCcam.mipsel
/opt/var/bin/./start_CCcam
fi