From f7f1a2a3b3aba78eae97e9d5825ef117245cf580 Mon Sep 17 00:00:00 2001 From: MacRimi Date: Sun, 16 Nov 2025 00:33:26 +0100 Subject: [PATCH] Update menu --- menu | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/menu b/menu index 9f46df9..cef2a52 100644 --- a/menu +++ b/menu @@ -56,40 +56,31 @@ check_updates() { INSTALL_URL="$REPO_URL/install_proxmenux.sh" INSTALL_SCRIPT="$BASE_DIR/install_proxmenux.sh" - [[ ! -f "$LOCAL_VERSION_FILE" ]] && return 0 REMOTE_VERSION="$(curl -fsSL "$VERSION_URL" 2>/dev/null | head -n 1)" [[ -z "$REMOTE_VERSION" ]] && return 0 - LOCAL_VERSION="$(head -n 1 "$LOCAL_VERSION_FILE" 2>/dev/null)" [[ -z "$LOCAL_VERSION" ]] && return 0 - [[ "$LOCAL_VERSION" = "$REMOTE_VERSION" ]] && return 0 - if whiptail --title "$(translate 'Update Available')" \ --yesno "$(translate 'New version available') ($REMOTE_VERSION)\n\n$(translate 'Do you want to update now?')" \ 10 60 --defaultno; then msg_warn "$(translate 'Starting ProxMenux update...')" - if curl -fsSL "$INSTALL_URL" -o "$INSTALL_SCRIPT"; then chmod +x "$INSTALL_SCRIPT" - bash "$INSTALL_SCRIPT" --update + exec menu - exec "$0" - else - msg_warn "$(translate 'Unable to download the installer. Please try again later.')" fi - else - msg_warn "$(translate 'Update postponed. You can update later from the menu.')" + fi } @@ -97,6 +88,7 @@ check_updates() { + main_menu() { local MAIN_MENU="$LOCAL_SCRIPTS/menus/main_menu.sh"