From 87b99dfb8b687850aa8fd104e3084f339c235331 Mon Sep 17 00:00:00 2001 From: Script Proyect by HP3ICC Date: Mon, 16 Sep 2024 22:46:43 +0000 Subject: [PATCH] Update menu-wifi-manager --- menu/menu-wifi-manager | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/menu/menu-wifi-manager b/menu/menu-wifi-manager index d80cbd1..96a82c5 100644 --- a/menu/menu-wifi-manager +++ b/menu/menu-wifi-manager @@ -176,6 +176,18 @@ if [ $? -eq 0 ]; then then sudo systemctl disable autoap.service fi + while true; do + if ping -c 1 noip.com >/dev/null 2>&1; then + # Si recibe respuesta de ping, ejecutar docker-compose down + cd /opt/wc + docker-compose down + + # Salir del ciclo y continuar con el script + break + fi + # Esperar antes del siguiente intento de ping + sleep 5 + done ;; "2") if ! systemctl status autoap.service | grep "Active: active" >/dev/null 2>&1 @@ -204,6 +216,7 @@ else whiptail --title "WiFi Mannager" --msgbox "Esta opcion solo esta disponible para Raspberry / This option is only available for Raspberry" 0 50 exit 0 fi + EOF # chmod +x /bin/menu-wifi-manager