diff --git a/ct/keycloak.sh b/ct/keycloak.sh index 32e25fd2..f473ac0c 100644 --- a/ct/keycloak.sh +++ b/ct/keycloak.sh @@ -30,7 +30,6 @@ function update_script() { fi if check_for_update "${APP}" "keycloak/keycloak"; then - local release="$CHECK_UPDATE_RELEASE" msg_info "Stopping ${APP}" systemctl stop keycloak @@ -47,7 +46,7 @@ function update_script() { tar -czf keycloak_conf_backup.tar.gz keycloak.old/conf msg_ok "Backup done" - fetch_and_deploy_gh_release "keycloak" "keycloak/keycloak" "prebuild" "$release" "/opt/keycloak" "keycloak-*.tar.gz" + fetch_and_deploy_gh_release "keycloak" "keycloak/keycloak" "prebuild" "latest" "/opt/keycloak" "keycloak-*.tar.gz" msg_info "Updating ${APP}" cd /opt @@ -57,12 +56,10 @@ function update_script() { rm -rf keycloak.old msg_ok "Updated ${APP} LXC" - echo "${release}" >~/.keycloak - msg_info "Restarting Keycloak" systemctl restart keycloak msg_ok "Restarted Keycloak" - msg_ok "Update to v${release} successful" + msg_ok "Update successful" fi exit 0 diff --git a/misc/tools.func b/misc/tools.func index b55f0af8..f8811698 100644 --- a/misc/tools.func +++ b/misc/tools.func @@ -2006,7 +2006,7 @@ check_for_update() { jq -r '.tag_name' | sed 's/^v//') # DEBUG - echo "[DEBUG] Latest release fetched: '${release}'" + #echo "[DEBUG] Latest release fetched: '${release}'" if [[ -z "$release" ]]; then msg_error "Unable to determine latest release for ${app}" @@ -2019,15 +2019,15 @@ check_for_update() { fi # DEBUG - echo "[DEBUG] Current file: '${current_file}'" - echo "[DEBUG] Current version read: '${current}'" + #echo "[DEBUG] Current file: '${current_file}'" + #echo "[DEBUG] Current version read: '${current}'" if [[ "$release" != "$current" ]] || [[ ! -f "$current_file" ]]; then - echo "[DEBUG] Decision: Update required (release='${release}' current='${current}')" + #echo "[DEBUG] Decision: Update required (release='${release}' current='${current}')" CHECK_UPDATE_RELEASE="$release" return 0 else - echo "[DEBUG] Decision: No update (release='${release}' current='${current}')" + #echo "[DEBUG] Decision: No update (release='${release}' current='${current}')" msg_ok "${app} is up to date (v${release})" return 1 fi