From 232e872c0db449db5af573863422f08fd49a5d49 Mon Sep 17 00:00:00 2001 From: MacRimi Date: Fri, 14 Nov 2025 21:37:55 +0100 Subject: [PATCH] Update menu --- menu | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/menu b/menu index 3c05ec8..11862eb 100644 --- a/menu +++ b/menu @@ -49,48 +49,41 @@ check_updates() { local VERSION_URL="$REPO_URL/version.txt" local INSTALL_URL="$REPO_URL/install_proxmenux.sh" - local CURL_OPTS=( -fsSL --connect-timeout 3 --max-time 5 ) - local REMOTE_VERSION REMOTE_VERSION="$(curl "${CURL_OPTS[@]}" "$VERSION_URL" 2>/dev/null | head -n 1 || true)" - if [ -z "$REMOTE_VERSION" ]; then return 0 fi - local LOCAL_VERSION="" if [ -f "$LOCAL_VERSION_FILE" ]; then LOCAL_VERSION="$(head -n 1 "$LOCAL_VERSION_FILE" 2>/dev/null || true)" fi - [ "$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?")" \ + 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...")" - + msg_warn "$(translate 'Starting ProxMenux update...')" if curl "${CURL_OPTS[@]}" "$INSTALL_URL" -o "$INSTALL_SCRIPT"; then chmod +x "$INSTALL_SCRIPT" - + # Aquí sigues usando source, como tenías source "$INSTALL_SCRIPT" else - msg_warn "$(translate "Unable to download the installer. Please try again later.")" + 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.")" + msg_warn "$(translate 'Update postponed. You can update later from the menu.')" fi }