mirror of
https://github.com/community-scripts/ProxmoxVE
synced 2025-12-12 19:06:13 +00:00
[feat]: migrate all update_scripts to new version helper (gh) (#7262)
* first migrations * finalize * add fix kometa inside function
This commit is contained in:
@@ -28,22 +28,17 @@ function update_script() {
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
RELEASE=$(curl -fsSL https://api.github.com/repos/oauth2-proxy/oauth2-proxy/releases/latest | jq -r .tag_name | sed 's/^v//')
|
||||
if [[ ! -f ~/.oauth2-proxy ]] || [[ "${RELEASE}" != "$(cat ~/.oauth2-proxy)" ]]; then
|
||||
msg_info "Stopping ${APP} services"
|
||||
if check_for_gh_release "oauth2-proxy" "oauth2-proxy/oauth2-proxy"; then
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop oauth2-proxy
|
||||
msg_ok "Stopped ${APP} service"
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
fetch_and_deploy_gh_release "oauth2-proxy" "oauth2-proxy/oauth2-proxy" "prebuild" "latest" "/opt/oauth2-proxy" "oauth2-proxy*linux-amd64.tar.gz"
|
||||
|
||||
msg_info "Starting ${APP} service"
|
||||
msg_info "Starting Service"
|
||||
systemctl start oauth2-proxy
|
||||
msg_ok "Started ${APP} service"
|
||||
|
||||
msg_ok "Started Service"
|
||||
msg_ok "Updated successfully!\n"
|
||||
else
|
||||
msg_ok "${APP} is already up to date (${RELEASE})"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user