From a95657947db0f0c183422a95b09a2f4a919cacca Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 29 May 2024 15:28:58 -0400 Subject: [PATCH] Update zoraxy.sh fix update --- ct/zoraxy.sh | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/ct/zoraxy.sh b/ct/zoraxy.sh index 1efc3331..84a40785 100644 --- a/ct/zoraxy.sh +++ b/ct/zoraxy.sh @@ -58,16 +58,15 @@ if [[ ! -d /opt/zoraxy/src ]]; then msg_error "No ${APP} Installation Found!"; e msg_info "Updating $APP" systemctl stop zoraxy cd /opt/zoraxy/src -if ! git pull; then - echo "Already up to date." - systemctl start zoraxy - echo "No update required." - exit +systemctl stop zoraxy +if git pull | grep -q 'Already up to date.'; then + msg_ok "Already up to date. No update required." +else + go mod tidy + go build + msg_ok "Updated $APP" fi -go mod tidy -go build systemctl start zoraxy -msg_ok "Updated $APP" exit }