clear
echo -e "\x3cs\033[0m"

#atualizar sistema


apt-get update
apt-get upgrade 
apt-get install zip
apt-get install build-essential 
apt-get install libssl-dev libpcsclite-dev 
apt-get install mercurial cvs subversion libncurses-dev 
apt-get install cmake 





# Compilar o Oscam

apt-get update

cd /usr/src

wget http://montagemcsp.dyndns.org/oscam/oscam.tgz

tar -zxf oscam.tgz

rm -rf oscam.tgz

cd oscam

cmake -DWEBIF=1 -DPCSC=1

make

cp oscam /usr/local/bin




# Alterar os atributos do Oscam

cd /usr/local/bin

chmod 755 oscam

# Os ficheiros de configuração 

cd /usr/local/
wget http://montagemcsp.dyndns.org/oscam/etc.tgz
tar -zxf etc.tgz
rm -rf etc.tgz


ditar o ficheiro
/etc/rc.local 

e antes do "exit 0" inserir a linha "/usr/local/bin/oscam –b"
#fim

reboot
