From e528ad6ef24e76534c73eccd0bb43568dd1fcb5b Mon Sep 17 00:00:00 2001 From: DAProgs Date: Thu, 26 Mar 2026 21:14:48 -0400 Subject: [PATCH] Update network-config.sh added update option --- network-config.sh | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) 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 }