Jump to content


Photo

Script to check if cccam is running - Where to place an script ?

DM500

  • Please log in to reply
6 replies to this topic

#1 fced

  • Senior Member
  • 75 posts

0
Neutral

Posted 24 January 2009 - 10:19

hello
i have found some script (for gemini i think) wich can help me to check if cccam is responding or not responding...
if not responding, restart cccam... i have some problem with it...
where should i put this script ? (there is no /var/script in PLI)
i use an PLI Jade maxvar latest version ...
this script need an cron tab also, to run it every xxx time...
here is the crontab
*/5 * * * * /script/checknewcs >>/log/checknewcs.log 2>&1

here the script
#!/bin/sh
CHECKNAME="test.txt"
IP="127.0.0.1"
PORT="16000"
echo info|nc $IP $PORT >>/tmp/$CHECKNAME
set $(ls -s /tmp/$CHECKNAME)
if [ "$1" = "0" ];
then
echo "
CCcam
 is not running, Restarting..."
/var/bin/CCcam restart
else
echo "
CCcam
 is running"
fi
rm /tmp/$CHECKNAME
exit			 [url=null]null[/url]

can someone help me please...

thanks
ced

Re: Script to check if cccam is running - Where to place an script ? #2 dAF2000

  • PLi® Ex-Leden
  • 14,151 posts

+52
Good

Posted 24 January 2009 - 10:29

Just place it in /var/bin and use the same "/var/bin/..." text in crontab too.
Many answers to your question can be found in our wiki: http://openpli.org/wiki

Re: Script to check if cccam is running - Where to place an script ? #3 fced

  • Senior Member
  • 75 posts

0
Neutral

Posted 26 January 2009 - 06:44

Hello

i need to reboot the dreambox each day at an certain hour (with an cron script)

on the wiki i have found how to create an cron, but i'm not really sure it has been created
After typed crontab-e in telnet, inserted "0 5 * * * reboot" and quitted
i have found an new file in my /var/spool/cron/crontab.2119
i edited the file : crontab.2119
and i found in this file my command : 0 5 * * * reboot
but it have'n worked... (Cron was active in System setting)
may be because i edited the file (chmod is 629 on the cron file)
Please can someone help me to create my first cron and give me the syntax to reboot at 4h40 am and to 20h30...
is it this ? i ask 2 different hours, to try to understand the how the cron syntax work

is it true ? for 04h40 am
0 4 4 0 * * * reboot

and for 20h30 pm
0 2 0 3 0 * * * reboot

thanks
céd

Re: Script to check if cccam is running - Where to place an script ? #4 dAF2000

  • PLi® Ex-Leden
  • 14,151 posts

+52
Good

Posted 26 January 2009 - 08:11

Here's an example of crontab: http://www.manpagez.com/man/5/crontab/
So, it would be:
40 4 * * * /sbin/reboot
30 20 * * * /sbin/reboot

Note we don't discuss illegal things like cardsharing, see our forum rules.
Many answers to your question can be found in our wiki: http://openpli.org/wiki

Re: Script to check if cccam is running - Where to place an script ? #5 fced

  • Senior Member
  • 75 posts

0
Neutral

Posted 26 January 2009 - 08:18

Thankyou Daf :)

Re: Script to check if cccam is running - Where to place an script ? #6 leonpadi

  • Member
  • 44 posts

0
Neutral

Posted 5 May 2009 - 15:23

Hello :)
Mr. daf2000 you mentioned very well the command for reboot.
How could that be, for stand-by ?

Thanks! :)

Re: Script to check if cccam is running - Where to place an script ? #7 dAF2000

  • PLi® Ex-Leden
  • 14,151 posts

+52
Good

Posted 6 May 2009 - 20:35

Hello :)
Mr. daf2000 you mentioned very well the command for reboot.
How could that be, for stand-by ?

Thanks! :)

Check this post of hemispherical and the link he mentions.

So, it's:
wget -O /tmp/wgettmp http://root:dreambox...command=standby



Also tagged with one or more of these keywords: DM500

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users