mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-09-11 01:44:38 +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:
parent
54b59e24ca
commit
9305a4ca85
145 changed files with 1041 additions and 1656 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue