Попадна ми един script за auto update на оscam скрипт, който автоматично проверява и актуализира oscam до последната версия и искам да го споделя с вас .. (моите колеги от този форум).
Scripta си прави auto update на Oscam винаги последната версия зависи кога си го настриите в crontabа за дата и час.да се ъпдеитва.Този е за 4:00 сутрента .
Scripta е за УБУНТУ ама става и за ДЕБИАН .АЗ съм на ДЕБИАН 6 стабилния.

Отваряме терминала и трибва да създадем директория

#sudo mkdir /var/local/bin/

после създаваме фаел:oscam_update.sh


#sudo nano /var/local/bin/oscam_update.sh

след това копираме следното съдържание ( самият скрипт)

----------------------------------------------------------------------------------------------------------------------------


###### #### ##### ##### ### ###
## ## ## ## ## ## ## ## ##
## ## ##### ## ####### ## ## ##
## ## ## ## ## ## ## ##
###### #### ##### ## ## ## ## R

################################################## ##################
# 18 Jan 2011
# By: billyk
# Description: Automaticaly check and update to latest oscam version
# Also restars it after update
################################################## ##################
# - You can modify it to fit your needs :)
# - Add # infront of any line that you don't want to execute
################################################## ##################
echo "--> 1rst go to oscam's dir"
cd /usr/local/bin
echo " [ OK ] "
echo "--> Backup previus version"
#you must create a folder named: oscam_backups under /usr/local/bin
sudo mv ./oscam ./oscam_backups/oscam_$(date +%m-%d-%Y-%H:%M)
echo " [ OK ] "
echo "--> Let's remove old folder..."
sudo rm -rf oscam-svn
echo " [ OK ] "
echo "--> Checking for latest version and create oscam-svn dir..."
sudo svn co http://www.streamboard.tv/svn/oscam/trunk oscam-svn
echo " [ OK ] "
echo "--> Change dir to: oscam-svn"
cd oscam-svn/
echo " [ OK ] "
echo "--> Create new folder: build_dir"
sudo mkdir build_dir
echo " [ OK ] "
echo "Change dir to: build_dir"
cd build_dir
echo " [ OK ] "
echo "--> Compile new version with Smargo smartreader support"
sudo cmake -DHAVE_LIBUSB=1 /usr/local/bin/oscam-svn

# You must have the needed libs to run smartreader with oscam.
# If you do not want smartreader support...
# ...simply remove [-DHAVE_LIBUSB=1]
# so you will have this line:
sudo cmake /usr/local/bin/oscam-svn

echo " [ OK ] "
echo "--> Now... make!"
sudo make
echo " [ OK ] "
echo "--> Finally we install the latest fersion..."
sudo make install
echo " [ OK ] "
echo "---> ...so it's time to clean..."
sudo make clean
echo "OK. Now you have the latest oscam version!"

################################################## #######################
# Also you can stop and start oscam from this script
# The only thing you have to do is to remove the # from following lines...
################################################## ########################
if ps x |grep -v grep |grep -c oscam >/dev/null
then
echo "Oscam is running so we will stop it & restart it"
sudo killall -9 oscam
echo "Oscam killed"
sleep 1
echo "...so going to start it"
sudo /usr/local/bin/oscam -b &
echo "Done. Oscam is running!"
echo "If oscam's settings are OK, you will have picture at 5 to 10 seconds!"
echo "Chears! :)"
else
echo "Starting oscam..."
sudo /usr/local/bin/oscam -b &
fi
################################################## ########################




Влизаме в директопия

#cd /var/local/bin/
И му задаваме права 755

#sudo chmod 755 oscam_update.sh



След това го пробваме дали сичко е на ред
,ако не е ,ще изреве нещо там си.........иии незнам
кво сте направили
В терминала пишем после:
За да го стартираме и да се ъпдеитне оскам
в терминала пишем


#cd /var/local/bin/

#sudo ./oscam_update.sh

След това влизаме в crontaba

sudo nano /etc/crontab

Слет това го стартираме когато си искаме в определеният час от деня.В crontabа се добавя:

0 4 * * * root /var/local/bin/oscam_update.sh


И честито,всеки ден последна версия на оскам в 4:00 сутрента

PS:Приемам всички забележки , ако нещо съм усрал и не сам добавил .Успех на всички