Thursday, June 23, 2011

script oscam auto restart when down working or not?

This script verify if oscam is running and if not they start oscam:
################################################
#!/bin/sh
if ps x |grep -v grep |grep -c oscam >/dev/null
then
echo "oscam... ok"
else
echo "oscam... restarting"
/var/script/CCcam_2.1.4_oscam_0.99.4_cam.sh start
################################################

1. put this lines into a file for ex: /var/script/Autooscam.sh
2. from blue pannel: Services/Daemons > activate crond
3. add a line in /var/spool/cron/crontabs/root for run AutoCCcam.sh at 32 minutes after the hour, or adjust the interval for your needs

# Run hourly cron jobs at 32 minutes after the hour:
32 * * * * /usr/script/Autooscam.sh

or "crontab -e root" to add the cron job: 32 * * * * /var/script/Autooscam.sh

1 comment:

  1. Harrah's Casino and Resort in Murphy - Mapyro
    Harrah's Casino and Resort Murphy. Mapyro area. Map of Harrah's Casino 안산 출장안마 and Resort Murphy. Map of Harrah's 밀양 출장마사지 Casino and Resort Murphy. Map of Harrah's Casino 동해 출장안마 and 강릉 출장마사지 Resort 강원도 출장마사지

    ReplyDelete