merge-requests/1/head
Esteban Mackay Q 2 years ago
parent 80bd2f0ceb
commit 57c5e755fb

@ -6,7 +6,29 @@ if [[ $EUID -ne 0 ]]; then
exit 1
fi
#whiptail --title "FreeDMR Bridge - Update" --msgbox "scrip sin actualizaciones disponibles / scrip no updates available" 0 50
SERVICIOS=("http.server-fdmr-b.service" "http.server-fdmr-b2.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
##############
#!/bin/bash
if ! grep -q "Web-Dashboar-name" "/opt/wdp7" > /dev/null 2>&1; then

@ -1,11 +1,32 @@
#!/bin/bash
# Verificar si el usuario tiene permisos de root
if [[ $EUID -ne 0 ]]; then
echo "Este script debe ejecutarse como usuario ROOT"
exit 1
fi
SERVICIOS=("http.server-fdmr.service" "http.server-fdmr2.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
##############
cd /
##################

Loading…
Cancel
Save

Powered by TurnKey Linux.