Tutorial : How to Install Ubuntu Server 10.04 + Oscam + Smargo Reader

There are 61 replies in this Thread which was already clicked 64,003 times. The last Post () by mckee25.

  • Howdy! I can't seem to get over the "compile" step!



    As oscam file I tried using the one here http://linuxsat-support.com/os…2-64-bit-6.html#post68991
    oscam-svn7315-x86_64-pc-linux-webif-libusb-ssl-Distribution.tar.gz (394.5 KB, 10 views) to be precise
    What am I doing wrong?

  • anyone successfully got a oscam check script working with this?


    Just an easy solution would be:


    Bash
    #!/bin/bash
    if ! ps x |grep -v grep |grep -c "oscam -b" >/dev/null
     then
     /usr/local/bin/oscam -b -r 2
    fi


    Replace the bold parts, with your exact oscam filename, and oscam path.
    Then chmod 755 and schedule it with cron, to run every 2 minutes.

  • Just an easy solution would be:


    Bash
    #!/bin/bash
    if ! ps x |grep -v grep |grep -c "oscam -b" >/dev/null
     then
     /usr/local/bin/oscam -b -r 2
    fi


    Replace the bold parts, with your exact oscam filename, and oscam path.
    Then chmod 755 and schedule it with cron, to run every 2 minutes.


    thanks, cant seem to get this to work :(


    used notepad++ to create a file called oscheck and entered:


    Bash
    #!/bin/bash
    if ! ps x |grep -v grep |grep -c "oscam -b" >/dev/null
     then
     /bin/oscam -b -r 2
    fi


    saved, ftp it to

    Code
    /etc/cron.hourly/

    and set Chmod to 755.


    logged onto terminal as user i set up when installing up ubuntu:


    Code
    crontab -e


    entered:


    Code
    */2 * * * * root /etc/cron.hourly/oscheck


    rebooted server, did

    Code
    cronrab -l

    to check if cron was there and it is


    killed oscam by using:

    Code
    sudo killall -9 oscam


    waited 5 mins and nothing, webif still down until i manually start oscam


    oscam binary is in correct location too


    any ideas? just a simple thing driving me insane!

  • thanks, cant seem to get this to work :(


    used notepad++ to create a file called oscheck and entered:



    Can you roll that all back ?


    Then, first test the script.. by shutting down oscam.. and run the script to check the startup..


    i changed it a bit:


    Code
    [FONT=courier new]if ! ps x |grep -v grep |grep -c "oscam -b" >/dev/null
     then
     echo "oscam was not running! - restarting.."
     /bin/oscam -b -r 2
    elif
     echo "oscam is running - no need to restart"
    fi
    [/FONT]



    After verification, put this line in /etc/crontab (as root):

    */2 * * * * root /your/path/to/./oscam-checker >/dev/null




  • tried to run the script


    i get:


    ./etc/cron.hourly/oscheck


    result is:


    bash: ./etc/cron.hourly/oscheck: No such file or directory


    the file is definitely in the right folder


    any ideas? tried sudo, tried sh. , tried root too to run the file


    should the script have an extension? like.sh?


  • Please follow my instructions..


    Roll back...


    That also means.. removing the file from that folder..


    Put it in /usr/local/bin. After copy, do a chmod 755 on the file.


    Then, start from scratch, as explained in my previous post.


  • thanks mate


    did as you said exactly


    cant seem to run the script,


    bash: /usr/local/bin/oscheck: line 7: syntax error near unexpected token `fi'
    bash: /usr/local/bin/oscheck: line 7: `fi'



    not very good with linux so not sure what im doing wrong?


  • do the following:


    sudo chmod 777 /usr/local/bin/oscheck <enter>
    oscheck <enter>


    and show output here.

  • do the following:


    sudo chmod 777 /usr/local/bin/oscheck <enter>
    oscheck <enter>


    and show output here.


    root@ubuntu:/usr/local/bin# sudo chmod 777 /usr/local/bin/oscheck
    root@ubuntu:/usr/local/bin# oscheck
    /usr/local/bin/oscheck: line 7: syntax error near unexpected token `fi'
    /usr/local/bin/oscheck: line 7: `fi'
    root@ubuntu:/usr/local/bin#

  • srry.. that's my fault..

    replace 'elif' with 'else' in the script..

  • still the same mate


    root@ubuntu:/usr/local/bin# . oscheck
    bash: /usr/local/bin/oscheck: line 7: syntax error near unexpected token `fi'
    bash: /usr/local/bin/oscheck: line 7: `fi'
    root@ubuntu:/usr/local/bin#


    ....


    Are you really really sure you saved correctly ?
    I got the same error as you in the script, and when modified it works..


    do a nano /usr/local/bin/oscheck to verify..


    (CTRL-X to save/exit)


    My output:

    Code
    root@OSC-CACHE:~# /usr/local/bin/oscheck
    oscam is running - no need to restart
    
    
    
    
    root@OSC-CACHE:~#


    Script:

    Code
    if ! ps x |grep -v grep |grep -c "oscam -b" >/dev/null
     then
     echo "oscam was not running! - restarting.."
     /usr/local/bin/oscam -b -r 2
    else
     echo "oscam is running - no need to restart"
    fi

  • 1000% sure mate



    saved it and when i run its the same error as above!


    this is driving mad lol

  • when i try to load this i get the error


    wget: unable to resolve host address `cdnetworks-us-2.dl.sourceforg...-1.0.8.tar.bz2'


    is this link still active is ther another link for to install service

  • Hi All. I am going to build a server using help from this very useful guide. When I go to the Ubuntu Website, the only version of Ubuntu Server available is Ubuntu Server 12.04.4 LTS. Will this tutorial work with this version ? Thanks all.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!