1
0
mirror of https://github.com/community-scripts/ProxmoxVE.git synced 2025-05-09 23:03:09 +00:00

Update streamlink-webui.sh (#4328)

This commit is contained in:
Tobias 2025-05-08 19:50:53 +02:00 committed by GitHub
parent ceaff9006a
commit 6ab80dc5e3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -31,25 +31,27 @@ function update_script() {
RELEASE=$(curl -fsSL https://api.github.com/repos/CrazyWolf13/streamlink-webui/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') RELEASE=$(curl -fsSL https://api.github.com/repos/CrazyWolf13/streamlink-webui/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then
msg_info "Starting Update"
msg_info "Stopping $APP" msg_info "Stopping $APP"
systemctl stop ${APP} systemctl stop ${APP}
msg_ok "Stopped $APP" msg_ok "Stopped $APP"
rm -rf /opt/${APP} rm -rf /opt/${APP}
NODE_VERSION="22" NODE_VERSION="22"
NODE_MODULE="npm@latest,yarn@latest" NODE_MODULE="npm,yarn"
install_node_and_modules install_node_and_modules
setup_uv setup_uv
fetch_and_deploy_gh_release "CrazyWolf13/streamlink-webui" fetch_and_deploy_gh_release "CrazyWolf13/streamlink-webui"
msg_info "Updating $APP to v${RELEASE}" msg_info "Updating $APP to v${RELEASE}"
$STD uv venv /opt/"${APPLICATION}"/backend/src/.venv $STD uv venv /opt/"${APP}"/backend/src/.venv
source /opt/"${APPLICATION}"/backend/src/.venv/bin/activate source /opt/"${APP}"/backend/src/.venv/bin/activate
$STD uv pip install -r /opt/streamlink-webui/backend/src/requirements.txt --python=/opt/"${APPLICATION}"/backend/src/.venv $STD uv pip install -r /opt/"${APP}"/backend/src/requirements.txt --python=/opt/"${APP}"/backend/src/.venv
cd /opt/"${APPLICATION}"/frontend/src cd /opt/"${APP}"/frontend/src
$STD yarn install $STD yarn install
$STD yarn build $STD yarn build
chmod +x /opt/"${APPLICATION}"/start.sh chmod +x /opt/"${APP}"/start.sh
msg_ok "Updated $APP to v${RELEASE}" msg_ok "Updated $APP to v${RELEASE}"
msg_info "Starting $APP" msg_info "Starting $APP"