Page 1 of 3 123 LastLast
Results 1 to 20 of 41

Thread: Please help need script to restart

  1. #1
    Verified Registered User Jules's Avatar
    Join Date
    Dec 2004
    Posts
    173
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Please help need script to restart

    Hi Guys,
    Hope someone can help me please.
    My VU+ Duo cam drops out every so often.
    Can someone help me with a script that will auto restart it if it stops?

    Thanks.
    Regards,
    Jules.

  2. #2
    V.I.P
    Join Date
    Dec 2004
    Posts
    2,732
    Thanks
    0
    Thanked 3 Times in 1 Post
    Make a script similar to this:

    Code:
    #!/bin/sh
    # DESCRIPTION=This script starts oscam on boot & checks it's running every 30 seconds.
    #--------------------------------
    # Check Oscam Is Running
    
    SERVICE='oscam'
    
    while true
    do
    if ps w | grep -v grep | grep $SERVICE > /dev/null
    then
     echo "oscam is running"
    else
     echo "oscam is not running - starting now"
    cd /
    /etc/oscam/oscam.sh start
    fi
        sleep 30
    done
    The script above checks to see if oscam is running - if not it executes: /etc/oscam/oscam.sh start

    Change that bit to execute your own script that runs oscam.

    Once done if you want this script to run at boot time - put it here:

    /etc/rc3.d/S100oscamcheck.sh
    Last edited by mrdude; 23-11-2015 at 01:40 PM.

  3. #3
    Verified Registered User Jules's Avatar
    Join Date
    Dec 2004
    Posts
    173
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks for reply mrdude.
    I am using CCcam.
    Do I use your script and just change Oscam to CCcam please?

  4. #4
    Verified Registered User Jules's Avatar
    Join Date
    Dec 2004
    Posts
    173
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks for this ozzsurf,
    What do I need to remove again please?

  5. #5
    Verified Registered User Jules's Avatar
    Join Date
    Dec 2004
    Posts
    173
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Sorry, silly me, I understand now thanks.
    What does the * * * * indicate?

  6. #6
    Verified Registered User Jules's Avatar
    Join Date
    Dec 2004
    Posts
    173
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks for advice

  7. #7
    Verified Registered User Jules's Avatar
    Join Date
    Dec 2004
    Posts
    173
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi ozzsrf I have installed your attached file to user/script folder.
    do I now add this line with ftp please:
    */1 * * * * /usr/script/cccam.check.sh

    Thanks,
    Jules.

  8. #8
    Verified Registered User Jules's Avatar
    Join Date
    Dec 2004
    Posts
    173
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi, I am using BH image

  9. #9
    Verified Registered User Jules's Avatar
    Join Date
    Dec 2004
    Posts
    173
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks ozzsurf,
    looking at cam menu, this is my cam: CCcam_2.3.0

  10. #10
    Verified Registered User Jules's Avatar
    Join Date
    Dec 2004
    Posts
    173
    Thanks
    0
    Thanked 0 Times in 0 Posts
    please can you confirm I put your file "cccam.check.sh"
    into usr/script folder

    And I put line "*/1 * * * * /usr/script/cccam.check.sh"
    into usr/bin as a txt file?

    Thanks

  11. #11
    Verified Registered User Jules's Avatar
    Join Date
    Dec 2004
    Posts
    173
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks very much.
    I can see in these folders there is already this line:
    */5 * * * * /usr/script/./ccheck.sh
    Do I leave that in?

  12. #12
    Verified Registered User Jules's Avatar
    Join Date
    Dec 2004
    Posts
    173
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks I have done that. So now I only have that one line in bh.cron and root.

    Is that correct?

  13. #13
    Verified Registered User Jules's Avatar
    Join Date
    Dec 2004
    Posts
    173
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks for your help ozzsurf, much appreciated!
    I suppose the only way to test if working on mine now is to wait and see?
    Just another question, will this use a lot of memory in my box, or can I change the check time by changing the number of minutes in:
    */1 * * * * /usr/script/cccam.1min-check.sh
    Or am I best just leaving as it is?
    Thanks.

  14. #14
    V.I.P
    Join Date
    Dec 2004
    Posts
    2,732
    Thanks
    0
    Thanked 3 Times in 1 Post
    Quote Originally Posted by Jules View Post
    Thanks for your help ozzsurf, much appreciated!
    I suppose the only way to test if working on mine now is to wait and see?
    Just another question, will this use a lot of memory in my box, or can I change the check time by changing the number of minutes in:
    */1 * * * * /usr/script/cccam.1min-check.sh
    Or am I best just leaving as it is?
    Thanks.
    You can test it by tel-netting into your box and killing CCcam then check to see if it starts again:

    Telnet command to see if CCcam is runnning:

    Code:
    cd /
    ps -A
    Telnet command to kill CCcam
    Code:
    cd /
    killall -9 CCcam
    
    or
    
    killall -9 CCcam_2.3.0
    Wait and enter the fist command again to see if the CCcam process starts automatically.
    Last edited by mrdude; 23-11-2015 at 10:31 PM.

  15. #15
    Member seamouse's Avatar
    Join Date
    Mar 2013
    Posts
    93
    Thanks
    0
    Thanked 0 Times in 0 Posts
    if using vix, there is a auto start on start up, but if the cam is dropping out dueing the day for no reason, try a new one

  16. #16
    Verified Registered User Jules's Avatar
    Join Date
    Dec 2004
    Posts
    173
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Sorry seamouse telnet rejects these commands

  17. #17
    Verified Registered User Jules's Avatar
    Join Date
    Dec 2004
    Posts
    173
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi ozzsurf,
    Thanks for reply.
    I just killed cam but it did not restart.
    Looked in usr/bin and ccam is like this:
    "CCcam_2.3.0"

    Should have worked?

  18. #18
    Verified Registered User Jules's Avatar
    Join Date
    Dec 2004
    Posts
    173
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks ozzsurf have checked and I can see that the code line you sent before was:
    */1 * * * * /usr/script/cccam.1min.check.sh
    The one you just showed me is:
    */1 * * * * /usr/script/cccam.1min-check.sh

    diffrerence is "-" and "." after "1min, can you see?
    will that make a difference?

  19. #19
    Verified Registered User Jules's Avatar
    Join Date
    Dec 2004
    Posts
    173
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Did you see you put a "-" instead "." ?
    See the difference in the 2 lines you sent:

    */1 * * * * /usr/script/cccam.1min.check.sh

    */1 * * * * /usr/script/cccam.1min-check.sh

    Cheers, Jules.
    Last edited by Jules; 24-11-2015 at 12:12 AM.

  20. #20
    Verified Registered User Jules's Avatar
    Join Date
    Dec 2004
    Posts
    173
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I just need to change the . to a - after 1min.
    Do you see just before the word "check"?

    */1 * * * * /usr/script/cccam.1min.check.sh


    */1 * * * * /usr/script/cccam.1min-check.sh
    Last edited by Jules; 24-11-2015 at 12:21 AM.

Page 1 of 3 123 LastLast

Similar Threads

  1. no picture or sound until after restart
    By johnski in forum Vu+ Duo Help Section
    Replies: 0
    Last Post: 06-02-2014, 04:07 PM
  2. Mgcamd restart
    By bellejt in forum CubeRevo Newbie Questions
    Replies: 0
    Last Post: 24-09-2011, 08:52 PM
  3. Restart Plugins all teh time !!
    By paulwilko in forum AZBox HD Newbie Questions
    Replies: 12
    Last Post: 02-11-2009, 07:26 PM
  4. Shortcut to cam restart
    By gerrykiddy in forum AZBox Premium Discussion
    Replies: 7
    Last Post: 17-10-2009, 09:54 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •