From f1c5f781ec63d05f61a77dc3f8edd680cdd5fb31 Mon Sep 17 00:00:00 2001 From: DAProgs Date: Thu, 12 Mar 2026 23:14:35 -0400 Subject: [PATCH] 2303.3 update 1 --- network-config.sh | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/network-config.sh b/network-config.sh index e0bb1ee..7b7d28e 100755 --- a/network-config.sh +++ b/network-config.sh @@ -324,6 +324,28 @@ print(ipaddress.IPv4Network('0.0.0.0/$1', strict=False).prefixlen) " 2>/dev/null || echo "24" } +# ── reboot ─────────────────────────────────────────────────────────────────── + +reboot_confirm() { + clear + echo "" + echo "╔══════════════════════════════════════════════════════════════════════════╗" + echo "║ Reboot ║" + echo "╚══════════════════════════════════════════════════════════════════════════╝" + echo "" + read -rp " Are you sure you want to reboot? [y/N]: " confirm + if [[ "$confirm" =~ ^[Yy]$ ]]; then + echo "" + echo " Rebooting..." + sleep 1 + reboot + else + echo " Cancelled." + echo "" + read -rp "Press Enter to continue..." + fi +} + # ── shell access ───────────────────────────────────────────────────────────── shell_access() { @@ -359,7 +381,7 @@ shell_access() { # ── main menu ───────────────────────────────────────────────────────────────── -MENU_ITEMS=("Refresh" "Set Static IP" "Set DHCP" "Shell") +MENU_ITEMS=("Refresh" "Set Static IP" "Set DHCP" "Shell" "Reboot") main_menu() { local choice @@ -388,6 +410,9 @@ main_menu() { 3) shell_access ;; + 4) + reboot_confirm + ;; esac done }