Jump to content


Photo

Script to restart CCcam


  • Please log in to reply
16 replies to this topic

#1 kokar

  • Member
  • 11 posts

0
Neutral

Posted 18 November 2012 - 19:17

Hi!

CCcam stops working by itself daily, and the EMU must resetartes manually every day!
How to put commandos inside crontab to prevent CCcam stops?
Is there a script for this?

Thanking you in advance!
My tuner;
DM7020 HD

PLI 3.0 Beta (updates f4rom 16.11.2012)

Regards
kokar

Edited by kokar, 18 November 2012 - 19:19.


Re: Script to restart CCcam #2 littlesat

  • PLi® Core member
  • 57,444 posts

+708
Excellent

Posted 18 November 2012 - 19:20

/etc/init.d/softcam restart

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: Script to restart CCcam #3 kokar

  • Member
  • 11 posts

0
Neutral

Posted 1 May 2013 - 18:20

I dont understand what you wrote :)

Could you pls explain for me?

Regards

kokar

/etc/init.d/softcam restart



Re: Script to restart CCcam #4 littlesat

  • PLi® Core member
  • 57,444 posts

+708
Excellent

Posted 2 May 2013 - 07:16

That is a command line to start CCcam (or any emu).


WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: Script to restart CCcam #5 hemispherical1

  • Senior Member
  • 1,596 posts

+49
Good

Posted 2 May 2013 - 19:09

Maybe a script like this, run from cron, after you verify it works manually...

 

 

#!/bin/sh                                                                                                                                                                                             
                                                                                                             
if ps | grep -v grep | grep CCcam > /dev/null  #Check target is running                                    
                                                                                                             
then                                                                                                         
                                                                                                             
   exit  #If target is running, exit the script                                                              
                                                                                                             
else                                                                                                         
                                                                                                             
/etc/init.d/softcam.CCcam start  #If it wasn't running, start it
                                                                                                                                                                                                                                                                                                                                                                                      
fi
 

If you're running a different version of CCcam, named differently, edit the script to match...

 

--

hemi



Re: Script to restart CCcam #6 kokar

  • Member
  • 11 posts

0
Neutral

Posted 4 May 2013 - 21:13

Many thanks for answer, but where can find the cron? Where should I write the CCcam version; I use CCcam221 

 

Would you please explain step by step and thanks in advance!

 

Regards

kokar



Re: Script to restart CCcam #7 hemispherical1

  • Senior Member
  • 1,596 posts

+49
Good

Posted 5 May 2013 - 16:03

Many thanks for answer, but where can find the cron? Where should I write the CCcam version; I use CCcam221 

 

Would you please explain step by step and thanks in advance!

 

Regards

kokar

If your cam binary was named CCcam221 then the script would look like

 

#!/bin/sh                                                                                                                                                                                            
                                                                                                             
if ps | grep -v grep | grep CCcam221 > /dev/null  #Check target is running                                    
                                                                                                             
then                                                                                                         
                                                                                                             
   exit  #If target is running, exit the script                                                              
                                                                                                             
else                                                                                                         
                                                                                                             
/etc/init.d/softcam.CCcam221 start #If it wasn't running, start it

fi

                                                                                                                                                                                                                                                                                                                                                                                    
Personally I use the "crontab -e" command to configure my cron jobs, but that requires a basic understanding of the Vi editor. You may find it easier to just create a text file named root (not root.txt, just root) containing a line like:

 

*/5 * * * * /path/to/script/above

or

*/5 * * * * /usr/bin/camcheck

etc...

 

That'd run the script every 5 minutes to check and restart cam if needed. */1 would check every minute, */2 every 2 minutes, etc... Copy the root file to /etc/cron/crontabs (resulting in /etc/cron/crontabs/root). If you created the file in windows, make sure Windows didn't add a hidden .txt extension. I don't "think" M$ carriage returns would choke the DB, but if the script or cron doesn't want to run, telnet into the box and run the dos2unix command on the relevant files, something like:

 

dos2unix /etc/cron/crontabs/root

dos2unix /usr/bin/camcheck

 

For more details on cron use:

 

http://lmgtfy.com/?q=dreambox+cron+use

 

 

--

hemi



Re: Script to restart CCcam #8 kokar

  • Member
  • 11 posts

0
Neutral

Posted 8 May 2013 - 17:13

1000 thanks dear hemispherical1 for ur very clearly explaining. Now I know how to make CCcam restart automaticly.

Best regards

kokar



Re: Script to restart CCcam #9 kokar

  • Member
  • 11 posts

0
Neutral

Posted 8 May 2013 - 17:29

Hi again Hemi..

should I have a file called "camcheck" in user/bin or its not needed?

Regards

kokar



Re: Script to restart CCcam #10 hemispherical1

  • Senior Member
  • 1,596 posts

+49
Good

Posted 8 May 2013 - 18:47

The script above has to be saved as an executable file somewhere in the DB's filesystem. In the example I named it camcheck and placed it in /usr/bin, but you may name it whatever you like and place it wherever you like as long as you know where it is... I'll let you... ;)

 

--

hemi



Re: Script to restart CCcam #11 kokar

  • Member
  • 11 posts

0
Neutral

Posted 13 September 2013 - 18:37

Thanks again! Just wanted to say that its working perfect for me now and cccam never stopps :)

Regards

kokar



Re: Script to restart CCcam #12 satwalker

  • Member
  • 23 posts

0
Neutral

Posted 2 February 2014 - 18:52

please can you add the file's here for cccam restart script i have the same problem 


Samsung LE-40F8000 & VUDUO2+SANDISK SSD-480GB & VISIOSAT BIG-BISAT Multi-Beam Antenna & Linksys WAG360N


Re: Script to restart CCcam #13 MiLo

  • PLi® Core member
  • 14,055 posts

+298
Excellent

Posted 2 February 2014 - 19:57

If the Cccam process really dies, then you're better of surrounding it with a shell script and restart it whenever it crashes.

Something like:

$ CCcam.sh
while true
do
CCcam
sleep 1
done

Much quicker than monitoring.

Of course, not having it crash would be even better...
Real musicians never die - they just decompose

Re: Script to restart CCcam #14 hemispherical1

  • Senior Member
  • 1,596 posts

+49
Good

Posted 2 February 2014 - 20:12

I can't really post "the files" as they are dependent on the file names and paths on your receiver.

 

That is why the "examples" are posted above, so people can make any edits that they might require and copy them into place, test them and make any changes that may be required. Then they can use cron to run the script on a schedule.

 

There should be enough information in this thread to make it work, everyone else appears to have been able to do it. If you get stuck somewhere, like cron for example, google is your friend. Search terms like dreambox, cron, schedule, etc...

 

 

Good luck,

--

hemi


Edited by hemispherical1, 2 February 2014 - 20:13.


Re: Script to restart CCcam #15 urick

  • Senior Member
  • 28 posts

0
Neutral

Posted 4 February 2014 - 18:41

please can you add the file's here for cccam restart script i have the same problem 

 

Change cccam version on 2.1.3 and everything well work fine, without freeses....


DM800HD Se, OpenPli 4.0

LANS-90 to 36E


Re: Script to restart CCcam #16 tsuka18

  • Member
  • 8 posts

0
Neutral

Posted 9 February 2014 - 17:09

hi,

I run cccam 230 but time to time I get the same problem ???   :huh:



Re: Script to restart CCcam #17 ajeeb

  • Senior Member
  • 385 posts

0
Neutral

Posted 9 February 2014 - 21:53

Many thanks for answer, but where can find the cron? Where should I write the CCcam version; I use CCcam221 

 

Would you please explain step by step and thanks in advance!

 

Regards

kokar

If your cam binary was named CCcam221 then the script would look like

 

#!/bin/sh                                                                                                                                                                                            
                                                                                                             
if ps | grep -v grep | grep CCcam221 > /dev/null  #Check target is running                                    
                                                                                                             
then                                                                                                         
                                                                                                             
   exit  #If target is running, exit the script                                                              
                                                                                                             
else                                                                                                         
                                                                                                             
/etc/init.d/softcam.CCcam221 start #If it wasn't running, start it

fi

                                                                                                                                                                                                                                                                                                                                                                                    
Personally I use the "crontab -e" command to configure my cron jobs, but that requires a basic understanding of the Vi editor. You may find it easier to just create a text file named root (not root.txt, just root) containing a line like:

 

*/5 * * * * /path/to/script/above

or

*/5 * * * * /usr/bin/camcheck

etc...

 

That'd run the script every 5 minutes to check and restart cam if needed. */1 would check every minute, */2 every 2 minutes, etc... Copy the root file to /etc/cron/crontabs (resulting in /etc/cron/crontabs/root). If you created the file in windows, make sure Windows didn't add a hidden .txt extension. I don't "think" M$ carriage returns would choke the DB, but if the script or cron doesn't want to run, telnet into the box and run the dos2unix command on the relevant files, something like:

 

dos2unix /etc/cron/crontabs/root

dos2unix /usr/bin/camcheck

 

For more details on cron use:

 

http://lmgtfy.com/?q=dreambox+cron+use

 

 

--

hemi

 

much better use nano 

 

cd /sbin
wget http://downloads.nas-central.org/LS2_MIPSel/Packages/mipsel-nano_2.0
mv mipsel-nano_2.0 nano
chmod +x nano
 
 

ET9000,DM500s+usbTTdvb-3600 ,DVB2000,Humax5400, MACbook PRO retina 13", MAC pro 2 x Quad XEON-2.8GB , 8GB ECC, 4TB+FusionDrive(SSD) , LG-24FHD, HD6870,Debian server

"Since the dawn of our species, Man has been blessed with curiosity"



1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users