Atualizar o SNEP para o 3.07

Responsive image

#!/bin/bash

cd /var/www/html/

echo "instalando git"

apt-get install -s git

sleep 20

git clone --recursive -b develop https://bitbucket.org/snepdev/snep-3.git

sleep 20

cd  /var/www/html/snep-3/modules/

wget http://sostic.com.br/pacotes-snep/billing_snep.tar.gz wget http://sostic.com.br/pacotes-snep/snep-ivr.tar.gz

sleep 20 echo "extraindo pacotes"

tar xvzf billing_snep.tar.gz tar xvzf snep-ivr.tar.gz

cd /var/www/html/

echo "parando o asterisk aguarde"

/etc/init.d/asterisk stop

sleep 20

mv snep snep-old mv snep-3/ snep cd snep/arquivos/

mkdir -p /var/www/html/snep/sounds

cd /var/www/html/snep/sounds/

ln -sf /var/lib/asterisk/moh/ moh ln -sf /var/lib/asterisk/sounds/pt_BR/ pt_BR

cd /var/www/html/

find . -type f  -exec chmod 640 {} ; -exec chown www-data:www-data {} ; sleep 20 echo "ajustando permissões" find . -type d  -exec chmod 755 {} ; -exec chown www-data:www-data {} ;

chmod +x /var/www/html/snep/agi/*

echo "iniciando asterisk"

/etc/init.d/asterisk start

mysql -u root -psneppass snep < /var/www/html/snep/install/database/update/3.07/update.sql