OScam Auto update script for Debian
Since oscam is still under developement and it is constantly updates in terms of SVN's (sub versions numbers).The updates are after every few hours, to update your system manually can be lengthly procedure.
So i write a simple auto update script, this script will automatically download new version from Streamboard and compile to for you.
To fully automate the procedure use cronjobs, to auto run say 3am every morning.
I compiled oscam on my pc with webif,irdeto guessing abd CW double check support but you can change setting and folder by editing script.
If you have compiled using different folder names etc, please edit script accordingly.
Procedure:
Download the file named "Oscam_update.sh" from the link below.
Copied the file to /emu/script via any FTP.
Chmod 755 via putty
Run via putty with this command /emu/script/./Oscam_update.sh
Download file from Oscam_update.sh
PHP Code:
#!/bin/sh
# ###### #### ##### ##### ### ###
# ## ## ## ## ## ## ## ## ##
# ## ## ##### ## ####### ## ## ##
# ## ## ## ## ## ## ## ##
# ###### #### ##### ## ## ## ## R
#
####################################################################
# 1 June 2011
# By: eyedream
# Description: Automaticaly Stop Oscam and update to latest oscam version
# Also restart it after update
####################################################################
# - You can modify it to fit your needs :)
# - Add # infront of any line that you don't want to execute
####################################################################
### Checking if Oscam is running, if yes then Stopping it ##########
process=`ps auxwww | grep oscam | grep -v grep | awk '{print $1}'`
if [ -z "$process" ]; then echo "Oscam was not running" else
echo "Stopping Oscam" /etc/init.d/oscam stop echo "Oscam stopped" fi
## Opening Oscam directory ##### cd /usr/src
## Removing Old directory ###### rm -rf oscam
### Downloading latest Version in oscam directory ####### echo "downloading latest SVN release of oscam" svn co http://streamboard.gmc.to/svn/oscam/trunk oscam sleep 2
## Opening new oscam directory ####### cd oscam/
## Making new directory called build ### mkdir build
## Opening directory Build cd build/
## Compiling Oscam ##### echo "Starting compilation of oscam with WEBIF Support,CW double check and irdeto guessing" cmake -DWEBIF=1 IRDETO_GUESSING=1 -DCS_WITH_DOUBLECHECK=1 .. sleep 5 echo "Compilation finished"
## Installing new version oscam ##### echo "Now installing" make install echo "Finished installing" sleep 2
## Starting Oscam ###### /etc/init.d/oscam start
sleep 2
## Checking if successfully started #### echo "Please wait while I check if Oscam started" sleep 3
process=`ps auxwww | grep oscam | grep -v grep | awk '{print $1}'`
if [ -z "$process" ]; then echo "Oscam still not running" echo "Trying again" /etc/init.d/oscam start else
echo "Oscam Running OK" fi
/emu/script/./oscam_update.sh: line 36: syntax error: unexpected end of file
ReplyDeletei use debian lenny 5.0.9