From 78d883a1b420ec358d17d94a787515b0c5549d50 Mon Sep 17 00:00:00 2001 From: MacRimi Date: Sun, 16 Nov 2025 00:17:22 +0100 Subject: [PATCH] Update menu --- menu | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/menu b/menu index a525f9b..101d5b8 100644 --- a/menu +++ b/menu @@ -72,7 +72,6 @@ check_updates() { LOCAL_VERSION="$(head -n 1 "$LOCAL_VERSION_FILE" 2>/dev/null || true)" fi - [[ "$LOCAL_VERSION" = "$REMOTE_VERSION" ]] && return 0 @@ -84,21 +83,29 @@ check_updates() { --yesno "$MESSAGE" \ 10 60 --defaultno; then - msg_warn "$(translate 'Starting ProxMenux update...')" + + local START_MSG + START_MSG="$(translate 'Starting ProxMenux update...')" + msg_warn "$START_MSG" if curl "${CURL_OPTS[@]}" "$INSTALL_URL" -o "$INSTALL_SCRIPT"; then chmod +x "$INSTALL_SCRIPT" + if ! bash -n "$INSTALL_SCRIPT" >/tmp/proxmenux-install-syntax.log 2>&1; then + msg_error "$(translate 'The installer has a syntax error. Aborting update. See:') /tmp/proxmenux-install-syntax.log" return 0 fi - if bash "$INSTALL_SCRIPT" --update >/tmp/proxmenux-install.log 2>&1; then - exec "$0" + if bash "$INSTALL_SCRIPT" --update >/tmp/proxmenux-install.log 2>&1; then + local DONE_MSG + DONE_MSG="$(translate 'ProxMenux has been updated successfully. Restarting menu...')" + msg_ok "$DONE_MSG" + exec "$0" else msg_error "$(translate 'Installer finished with errors. See log:') /tmp/proxmenux-install.log" - return 0 + return 0 fi else msg_warn "$(translate 'Unable to download the installer. Please try again later.')" @@ -110,6 +117,7 @@ check_updates() { + main_menu() { local MAIN_MENU="$LOCAL_SCRIPTS/menus/main_menu.sh"