diff --git a/network-config.sh b/network-config.sh index 349d56d..db427ba 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" } +# ── update ─────────────────────────────────────────────────────────────────── + +run_update() { + clear + echo "" + echo "╔══════════════════════════════════════════════════════════════════════════╗" + echo "║ Update ║" + echo "╚══════════════════════════════════════════════════════════════════════════╝" + echo "" + + if [ ! -f /root/update.sh ]; then + echo " Error: /root/update.sh not found." + echo "" + read -rp "Press Enter to continue..." + return + fi + + bash /root/update.sh + echo "" + read -rp "Press Enter to continue..." +} + # ── reboot ─────────────────────────────────────────────────────────────────── reboot_confirm() { @@ -381,7 +403,7 @@ shell_access() { # ── main menu ───────────────────────────────────────────────────────────────── -MENU_ITEMS=("Refresh" "Set Static IP" "Set DHCP" "Shell" "Reboot") +MENU_ITEMS=("Refresh" "Set Static IP" "Set DHCP" "Shell" "Reboot" "Update") main_menu() { local choice @@ -413,6 +435,9 @@ main_menu() { 4) reboot_confirm ;; + 5) + run_update + ;; esac done }