From a932613827caf49738675a58089b69b0015d1d54 Mon Sep 17 00:00:00 2001 From: usmannasir Date: Sun, 31 Aug 2025 00:04:51 +0500 Subject: [PATCH] bug fix: snappymail on ubuntu 24 --- cyberpanel.sh | 2 +- cyberpanel_upgrade.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cyberpanel.sh b/cyberpanel.sh index 0e55e2bed..5a5919bcd 100644 --- a/cyberpanel.sh +++ b/cyberpanel.sh @@ -415,7 +415,7 @@ do log_error "Command failed after 50 retries: $1" exit 2 else - $1 && break || { + eval "$1" && break || { echo -e "\n$1 has failed for $i times\nWait and try again...\n" log_warning "Command failed, retry $i/50: $1" # Exponential backoff: 1s, 2s, 4s, 8s, then cap at 10s diff --git a/cyberpanel_upgrade.sh b/cyberpanel_upgrade.sh index 39b909bf5..50b014797 100644 --- a/cyberpanel_upgrade.sh +++ b/cyberpanel_upgrade.sh @@ -303,7 +303,7 @@ Retry_Command() { # shellcheck disable=SC2034 for i in {1..50}; do - $1 && break || echo -e "\n$1 has failed for $i times\nWait for 3 seconds and try again...\n"; sleep 3; + eval "$1" && break || echo -e "\n$1 has failed for $i times\nWait for 3 seconds and try again...\n"; sleep 3; done }