diff --git a/ct/zoraxy.sh b/ct/zoraxy.sh index 8ae57d1a..ed88e1e8 100644 --- a/ct/zoraxy.sh +++ b/ct/zoraxy.sh @@ -55,8 +55,8 @@ function default_settings() { function update_script() { header_info if [[ ! -d /opt/zoraxy/ ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +RELEASE=$(curl -s https://api.github.com/repos/tobychui/zoraxy/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then - RELEASE=$(curl -s https://api.github.com/repos/tobychui/zoraxy/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') msg_info "Updating $APP to ${RELEASE}" systemctl stop zoraxy wget -q "https://github.com/tobychui/zoraxy/releases/download/${RELEASE}/zoraxy_linux_amd64"