Update asl-wizard.sh

This commit is contained in:
Esteban Mackay Q 2023-11-28 12:00:58 -05:00
parent 3a04e3bde5
commit d0a9eaa4ba
1 changed files with 39 additions and 13 deletions

View File

@ -12,20 +12,32 @@ wget http://dvswitch.org/buster
chmod +x buster
./buster
fi
apt-get update && apt-get upgrade -y
if ! grep -q 'Raspberry' /proc/cpuinfo; then
if ! [ -d "/etc/asterisk" ]; then
apt-get install allstar -y
fi
if [ -f "/etc/os-release" ]; then
source /etc/os-release
if [ "$VERSION_ID" == "10" ]; then
apt update -y
apt upgrade -y
else
apt-get update
apt-get upgrade -y
fi
fi
if [ ! -d "/etc/asterisk" ]; then
# Verificar si el sistema operativo es Debian 10
if [ -f "/etc/os-release" ]; then
source /etc/os-release
if [ "$VERSION_ID" == "10" ]; then
source /etc/os-release
if [ "$VERSION_ID" == "10" ]; then
# echo "Instalando AllStar en Debian 10"
apt install allstar -y
else
# Verificar si no es una Raspberry Pi
if ! grep -q 'Raspberry' /proc/cpuinfo; then
# echo "Instalando AllStar en sistema no identificado como Raspberry Pi"
apt-get install allstar -y
fi
fi
else
echo "El directorio /etc/asterisk ya existe. No es necesario instalar AllStar."
fi
if [ -f "/lib/systemd/system/asterisk.service" ]; then
systemctl stop asterisk
@ -42,11 +54,25 @@ wget --load-cookies /tmp/cookies.txt "https://docs.google.com/uc?export=download
unzip /etc/asterisk/asl-wizard.zip -d /etc/asterisk/
fi
#
if [ ! -f "/opt/MMDVM_Bridge/MMDVM_Bridge" ]; then
apt-get install MMDVM_Bridge -y
fi
if [ ! -f "/opt/Analog_Bridge/Analog_Bridge" ]; then
apt-get install Analog_Bridge -y
# Verificar si el sistema operativo es Debian 10
source /etc/os-release
if [ "$VERSION_ID" == "10" ]; then
apt install Analog_Bridge -y
else
apt-get install Analog_Bridge -y
fi
fi
if [ ! -f "/opt/MMDVM_Bridge/MMDVM_Bridge" ]; then
# Verificar si el sistema operativo es Debian 10
source /etc/os-release
if [ "$VERSION_ID" == "10" ]; then
apt install MMDVM_Bridge -y
else
apt-get install MMDVM_Bridge -y
fi
fi
#USER99
# Lista de servicios a reiniciar