auto restart script not working

xMx

Registered
Messages
91
auto restart script not working.
i have installed a Dreambox 800 original ( Oozoon gp3 imaage) server with cccam.
everything works now except the auto restart script when offline...
i have added the script ( usr, script ) and Cron 6 * * *, see attachement, but when i give cccam stop it does not restart automaticly.
can someone pls tell me whats wrong in the script?
reg,

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

percivjr

Registered
Messages
462
Script looks OK to me.

But are you sure that cron is actually running the script at 6 minutes past each hour?

I'd put something like:

echo "script running" > > temp.file

(without space between chevrons - 2 chevrons prints as 4 asterisks on this forum!!!) in the script and see if temp.file gets created (change crotab to * * * * * to speed up testing.
 
Last edited:

xMx

Registered
Messages
91
Script looks OK to me.

But are you sure that cron is actually running the script at 6 minutes past each hour?

I'd put something like:

echo "script running" > > temp.file

(without space between chevrons - 2 chevrons prints as 4 asterisks on this forum!!!) in the script and see if temp.file gets created (change crotab to * * * * * to speed up testing.

Thanks friend, a question, we have two options to choose from Cron,
1-Time 2 Interval. hviken of this should I choose?
sorry friend I do not understand what does (echo "script running" **** temp.file)

Best regards
 

percivjr

Registered
Messages
462
echo "script running" just puts some text into a temporary file which you can then examine to check that the script actually ran.

I wasn't aware of the time/interval option on cron. How often do you want the script to run?
 

percivjr

Registered
Messages
462
So in your crontab you should put:

0-55/5 * * * * /path/to/script

or

0,5,10,15,20,25,30,35,40,45,50,55 * * * * /path/to/script
 

xMx

Registered
Messages
91
Hi friend
I have dreambox, what is this???
0-55/5 * * * * /path/to/script

or

0,5,10,15,20,25,30,35,40,45,50,55 * * * * /path/to/script
regards
 

percivjr

Registered
Messages
462
i have added the script ( usr, script ) and Cron 6 * * *, see attachement

but there is no attachment!

So what is your crontab entry? (give command crontab -l)

What is the name of your script and which directory is it in?
 
Top