PABX da Simples IP
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.

45 lines
1.3 KiB

#!/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
cd /tmp/
/bin/rm -rf instaladores_simplesip.tar.gz
wget -c http://$SERVIDOR/downloads/instalador_asterisk/instaladores_simplesip.tar.gz --progress=bar:force 2>&1 | tail -f -n +6
if ! [ -e instaladores_simplesip.tar.gz ] ; then
clear
echo ""
echo ""
echo "Falha no download do arquivo..."
echo ""
echo ""
exit
fi
tar xzf instaladores_simplesip.tar.gz
sleep 1
chmod 777 instaladores_simplesip/install.sh
sleep 1
./instaladores_simplesip/install.sh
RESULT=$?
[ "$RESULT" = "0" ] && sleep 1 && /bin/sip_install_app_site.sh -f $SERVIDOR