Update install.sh

merge-requests/1/head
Script Proyect by HP3ICC 2 years ago
parent 4b59521e04
commit 984e6cd530

@ -69,7 +69,46 @@ then variable=0000
fi
###################################
SERVICIOS=("adn-server.service" "freedmr.service" "proxy.service" "adn-parrot.service" "fdmrparrot.service")
for servicio in "${SERVICIOS[@]}"; do
# Verificar si el servicio existe
if systemctl list-unit-files --type=service | grep -q "^$servicio "; then
echo "El servicio $servicio existe."
# Verificar si el servicio está activo
if systemctl is-active --quiet $servicio; then
echo "El servicio $servicio está activo. Deteniendo..."
sudo systemctl stop $servicio
else
echo "El servicio $servicio no está activo."
fi
# Deshabilitar el servicio
echo "Deshabilitando el servicio $servicio..."
sudo systemctl disable $servicio
else
echo "El servicio $servicio no existe."
fi
done
if [ -f "/lib/systemd/system/fdmrparrot.service" ];
then
rm /lib/systemd/system/fdmrparrot.service
fi
if [ -f "/lib/systemd/system/freedmr.service" ];
then
rm /lib/systemd/system/freedmr.service
fi
if [ -f "/opt/FreeDMR/config/FreeDMR.cfg" ];
then
mv /opt/FreeDMR/config/FreeDMR.cfg /opt/Old_Config-FreeDMR.cfg
fi
if [ -d "/opt/FreeDMR" ];
then
rm -r /opt/FreeDMR/
fi
##########################################################
if [ -d "/var/log/ADN" ]
then

Loading…
Cancel
Save

Powered by TurnKey Linux.