mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-09-25 11:11:02 +00:00
Refactor (#6434)
This commit is contained in:
@@ -27,10 +27,23 @@ function update_script() {
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
msg_info "Updating $APP LXC"
|
||||
$STD apt-get update
|
||||
$STD apt-get -y upgrade
|
||||
msg_ok "Updated $APP LXC"
|
||||
|
||||
RELEASE=$(curl -fsSL https://api.github.com/repos/owncast/owncast/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||
if [[ ! -f ~/.owncast ]] || [[ "${RELEASE}" != "$(cat ~/.owncast)" ]]; then
|
||||
msg_info "Stopping ${APP}"
|
||||
systemctl stop owncast
|
||||
msg_ok "Stopped ${APP}"
|
||||
|
||||
fetch_and_deploy_gh_release "owncast" "owncast/owncast" "prebuild" "latest" "/opt/owncast" "owncast*linux-64bit.zip"
|
||||
|
||||
msg_info "Starting ${APP}"
|
||||
systemctl start owncast
|
||||
msg_ok "Started ${APP}"
|
||||
|
||||
msg_ok "Updated Successfully"
|
||||
else
|
||||
msg_ok "No update required. ${APP} is already at ${RELEASE}."
|
||||
fi
|
||||
exit
|
||||
}
|
||||
|
||||
@@ -41,4 +54,4 @@ description
|
||||
msg_ok "Completed Successfully!\n"
|
||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8080/admin${CL}"
|
||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8080/admin${CL}"
|
||||
|
Reference in New Issue
Block a user