VU+ Receiver General Setup Questions Cronjob

  • Thread starter Thread starter esuo2
  • Start date Start date
E

esuo2

hi all
I have script to restart/check CCcam in /var/script/
then root containing cronjob in /var/etc/cron/crontabs/

Code:
*/1 * * * * /var/script/CCcamCheck.sh

then this is the script

Code:
#!/bin/sh
if ps x |grep -v grep |grep -c CCcam >/dev/null
then
echo "cccam... ok"
else
echo "cccam... restarting"
/usr/bin/[COLOR="#00FF00"]CCcam_2.1.3[/COLOR] &
fi

change the script to look like my CCcam in /var/bin CCcam_2.1.3

then i telnet to box and type

Code:
crontab - e

i get

Code:
usage crontab -c [dir}etc...

pls how do i know the script is working
thanks
 
Simply edit the file /etc/cron/root & add the line there,
Code:
*/1 * * * * /var/script/CCcamCheck.sh

As long as the file /var/script/CCcamCheck.sh is executable (755 permissions) it will run.