Update network-config.sh

added update option
This commit is contained in:
2026-03-26 21:14:48 -04:00
parent d1baffdc07
commit e528ad6ef2
+26 -1
View File
@@ -324,6 +324,28 @@ print(ipaddress.IPv4Network('0.0.0.0/$1', strict=False).prefixlen)
" 2>/dev/null || echo "24" " 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 ───────────────────────────────────────────────────────────────────
reboot_confirm() { reboot_confirm() {
@@ -381,7 +403,7 @@ shell_access() {
# ── main menu ───────────────────────────────────────────────────────────────── # ── 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() { main_menu() {
local choice local choice
@@ -413,6 +435,9 @@ main_menu() {
4) 4)
reboot_confirm reboot_confirm
;; ;;
5)
run_update
;;
esac esac
done done
} }