Update menu-fdmr

This commit is contained in:
Esteban Mackay Q. 2025-02-06 22:30:07 -05:00
parent c8c559be75
commit d92354581e
1 changed files with 10 additions and 2 deletions

View File

@ -461,8 +461,16 @@ servicios="adn-parrot.service adn_parrot.service fdmrparrot.service"
# Recorre la lista de servicios y deshabilita y detiene sin enviar mensaje
for servicio in $servicios; do
sudo systemctl disable --quiet "$servicio"
sudo systemctl stop --quiet "$servicio"
# Verifica si el servicio existe antes de intentar deshabilitarlo y detenerlo
if systemctl list-unit-files --type=service | grep -q "^$servicio"; then
sudo systemctl disable --quiet "$servicio"
sudo systemctl stop --quiet "$servicio"
fi
# Verifica si el archivo del servicio existe antes de intentar eliminarlo
if [ -f /lib/systemd/system/"$servicio" ]; then
sudo rm /lib/systemd/system/"$servicio"
fi
done
################
sudo chmod +x /bin/menu*