mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2025-11-17 19:16:25 +00:00
Update menu
This commit is contained in:
14
menu
14
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,17 +83,25 @@ 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
|
||||
|
||||
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"
|
||||
@@ -110,6 +117,7 @@ check_updates() {
|
||||
|
||||
|
||||
|
||||
|
||||
main_menu() {
|
||||
local MAIN_MENU="$LOCAL_SCRIPTS/menus/main_menu.sh"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user