Monday 20 July 2009

Script to restart CCcam if it stops responding

here is a small script that will check if your CCcam is running or not and it will restart it if not running


Save this file in the script folder, you can use any name you like example CCcamcheck.sh

then if you have crontab set the script to run every 10 mins for example, this crontab only depends on the image you use ofcourse not all images has this function.


#!/bin/sh
if ps x |grep -v grep |grep -c CCcam >/dev/null
then
echo "cccam... ok"
else
echo "cccam... restarting"
/var/bin/CCcam_2.0.8 &
fi



hope you find this usefull especiall if you have problems that CCcam crashes and you have the server down

No comments:

Post a Comment