forked from SimplesIP/pabx-app
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
1.2 KiB
41 lines
1.2 KiB
2 years ago
|
#!/bin/bash
|
||
|
trap "" 2 20
|
||
|
SERVIDOR=$1
|
||
|
SERIDOR_DEFAULT=192.168.115.12
|
||
|
ARQUITETURA=$(uname -m)
|
||
|
if [ "$1" == "-f" ] ; then
|
||
|
SERVIDOR=$2
|
||
|
else
|
||
|
if [ -d /var/www/html/aplicativo ] ; then
|
||
|
clear
|
||
|
echo ""
|
||
|
echo ""
|
||
|
echo "Ja existe uma versao do aplicativo instalada nesse servidor..."
|
||
|
echo "Por favor entre em contato com o Suporte Tecnico"
|
||
|
echo "Contatos: (65) 3616-8280 / suporte@simplesip.com.br"
|
||
|
echo ""
|
||
|
echo ""
|
||
|
exit
|
||
|
fi
|
||
|
fi
|
||
|
|
||
|
if [ -z "$SERVIDOR" ] ; then
|
||
|
SERVIDOR=$SERIDOR_DEFAULT
|
||
|
fi
|
||
|
|
||
|
/bin/rm -rf aplicativo-simplesip*.tar.gz
|
||
|
wget -c -r -A.gz -nd -l1 http://$SERVIDOR/downloads/instalador_simplesip/ --progress=bar:force 2>&1 | tail -f -n +6
|
||
|
|
||
|
if ! [ -e aplicativo-simplesip*.tar.gz ] ; then
|
||
|
clear
|
||
|
echo ""
|
||
|
echo ""
|
||
|
echo "Falha no download do arquivo..."
|
||
|
echo ""
|
||
|
echo ""
|
||
|
exit
|
||
|
fi
|
||
|
tar xzf aplicativo-simplesip*.tar.gz
|
||
|
chmod 777 aplicativo-simplesip/sip_install.sh
|
||
|
./aplicativo-simplesip/sip_install.sh
|