Update asl-wizard.sh

This commit is contained in:
Esteban Mackay Q 2023-11-28 10:55:37 -05:00
parent 99712bf3cf
commit 2bacb283e1
1 changed files with 22 additions and 1 deletions

View File

@ -57,7 +57,7 @@ for servicio in "${servicios[@]}"; do
if systemctl is-active "$servicio" >/dev/null 2>&1; then
echo "Deteniendo y deshabilitando $servicio"
systemctl stop "$servicio"
systemctl disable "$servicio"
# systemctl disable "$servicio"
else
echo "$servicio ya está detenido"
fi
@ -112,6 +112,27 @@ hideNodeURL=no
EOFX
fi
servicios=("md380-emu99.service" "analog_bridge99.service" "mmdvm_bridge99.service" "md380-emu.service" "analog_bridge.service" "mmdvm_bridge.service")
# Recorre la lista de servicios y verifica si están activos
for servicio in "${servicios[@]}"; do
if systemctl list-units --all | grep -q "$servicio"; then
if systemctl is-active "$servicio" >/dev/null 2>&1; then
echo "Deteniendo y deshabilitando $servicio"
systemctl stop "$servicio"
# systemctl disable "$servicio"
else
echo "$servicio ya está detenido"
fi
if systemctl is-enabled "$servicio" >/dev/null 2>&1; then
echo "Iniciando $servicio"
systemctl start "$servicio"
fi
else
echo "$servicio no existe"
fi
done