add streamlink-webui
This commit is contained in:
parent
45f9711224
commit
26f1c8d6fa
70
ct/streamlink-webui.sh
Normal file
70
ct/streamlink-webui.sh
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
||||||
|
# Copyright (c) 2021-2025 community-scripts ORG
|
||||||
|
# Author: CrazyWolf13
|
||||||
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
|
# Source: https://github.com/CrazyWolf13/streamlink-webui
|
||||||
|
|
||||||
|
# App Default Values
|
||||||
|
APP="streamlink-webui"
|
||||||
|
var_tags="download;streaming"
|
||||||
|
var_cpu="2"
|
||||||
|
var_ram="2048"
|
||||||
|
var_disk="5"
|
||||||
|
var_os="debian"
|
||||||
|
var_version="12"
|
||||||
|
var_unprivileged="1"
|
||||||
|
# 1 = unprivileged container, 0 = privileged container
|
||||||
|
|
||||||
|
header_info "$APP"
|
||||||
|
variables
|
||||||
|
color
|
||||||
|
catch_errors
|
||||||
|
|
||||||
|
function update_script() {
|
||||||
|
header_info
|
||||||
|
check_container_storage
|
||||||
|
check_container_resources
|
||||||
|
|
||||||
|
if [[ ! -f /opt/streamlink-webui ]]; then
|
||||||
|
msg_error "No ${APP} Installation Found!"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
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
|
||||||
|
msg_info "Stopping $APP"
|
||||||
|
systemctl stop ${APP}
|
||||||
|
msg_ok "Stopped $APP"
|
||||||
|
|
||||||
|
msg_info "Creating Backup"
|
||||||
|
msg_ok "Backup Created"
|
||||||
|
|
||||||
|
msg_info "Updating $APP to v${RELEASE}"
|
||||||
|
fetch_and_deploy_gh_release "CrazyWolf13/streamlink-webui"
|
||||||
|
cd /opt/"${APPLICATION}"/backend/src
|
||||||
|
pip install -r requirements.txt
|
||||||
|
cd ../../frontend/src
|
||||||
|
npm install
|
||||||
|
yarn build
|
||||||
|
msg_ok "Updated $APP to v${RELEASE}"
|
||||||
|
|
||||||
|
msg_info "Starting $APP"
|
||||||
|
systemctl start ${APP}
|
||||||
|
msg_ok "Started $APP"
|
||||||
|
|
||||||
|
msg_ok "Update Successful"
|
||||||
|
else
|
||||||
|
msg_ok "No update required. ${APP} is already at v${RELEASE}"
|
||||||
|
fi
|
||||||
|
exit
|
||||||
|
}
|
||||||
|
|
||||||
|
start
|
||||||
|
build_container
|
||||||
|
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}:[PORT]${CL}"
|
40
frontend/public/json/streamlink-webui.json
Normal file
40
frontend/public/json/streamlink-webui.json
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
{
|
||||||
|
"name": "Streamlink WebUI",
|
||||||
|
"slug": "streamlink-webui",
|
||||||
|
"categories": [
|
||||||
|
11
|
||||||
|
],
|
||||||
|
"date_created": "2025-05-05",
|
||||||
|
"type": "ct",
|
||||||
|
"updateable": true,
|
||||||
|
"privileged": false,
|
||||||
|
"interface_port": 8000,
|
||||||
|
"documentation": "https://github.com/CrazyWolf13/streamlink-webui",
|
||||||
|
"config_path": "/opt/streamlink-webui/.env",
|
||||||
|
"website": "https://github.com/CrazyWolf13/streamlink-webui",
|
||||||
|
"logo": null,
|
||||||
|
"description": "a simple web-ui to the well-known streamlink cli application ",
|
||||||
|
"install_methods": [
|
||||||
|
{
|
||||||
|
"type": "default",
|
||||||
|
"script": "ct/streamlink-webui.sh",
|
||||||
|
"resources": {
|
||||||
|
"cpu": 2,
|
||||||
|
"ram": 2048,
|
||||||
|
"hdd": 5,
|
||||||
|
"os": "Debian",
|
||||||
|
"version": "12"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"default_credentials": {
|
||||||
|
"username": "null",
|
||||||
|
"password": "null"
|
||||||
|
},
|
||||||
|
"notes": [
|
||||||
|
{
|
||||||
|
"text": "This app requires a Twitch Cliend_ID and Client_Secret, set it in the Config file. Look in the Documentation on how to obtain it.",
|
||||||
|
"type": "info"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
74
install/streamlink-webui-install.sh
Normal file
74
install/streamlink-webui-install.sh
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Copyright (c) 2021-2025 community-scripts ORG
|
||||||
|
# Author: CrazyWolf13
|
||||||
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
|
# Source: https://github.com/CrazyWolf13/streamlink-webui
|
||||||
|
|
||||||
|
# Import Functions und Setup
|
||||||
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||||
|
color
|
||||||
|
verb_ip6
|
||||||
|
catch_errors
|
||||||
|
setting_up_container
|
||||||
|
network_check
|
||||||
|
update_os
|
||||||
|
|
||||||
|
msg_info "Setup Python3"
|
||||||
|
$STD apt-get install -y \
|
||||||
|
python3 \
|
||||||
|
python3-pip
|
||||||
|
rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED
|
||||||
|
msg_ok "Setup Python3"
|
||||||
|
|
||||||
|
msg_info "Setup NodeJS"
|
||||||
|
export NODE_MODULE="npm@latest"
|
||||||
|
install_node_and_modules
|
||||||
|
msg_ok "Setup NodeJS"
|
||||||
|
|
||||||
|
# Setup App
|
||||||
|
msg_info "Setup ${APPLICATION}"
|
||||||
|
fetch_and_deploy_gh_release "CrazyWolf13/streamlink-webui"
|
||||||
|
cd /opt/"${APPLICATION}"/backend/src
|
||||||
|
pip install -r requirements.txt
|
||||||
|
cd ../../frontend/src
|
||||||
|
npm install
|
||||||
|
yarn build
|
||||||
|
msg_ok "Setup ${APPLICATION}"
|
||||||
|
|
||||||
|
# Creating Service (if needed)
|
||||||
|
msg_info "Creating Service"
|
||||||
|
cat <<'EOF' >/opt/"${APPLICATION}".env
|
||||||
|
CLIENT_ID='your_client_id'
|
||||||
|
CLIENT_SECRET='your_client_secret'
|
||||||
|
DOWNLOAD_PATH=/opt/streamlink-webui-download'
|
||||||
|
# BASE_URL='https://sub.domain.com' \
|
||||||
|
# REVERSE_PROXY=True \
|
||||||
|
EOF
|
||||||
|
|
||||||
|
cat <<EOF >/etc/systemd/system/"${APPLICATION}".service
|
||||||
|
[Unit]
|
||||||
|
Description=${APPLICATION} Service
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
EnvironmentFile=/opt/${APPLICATION}.env
|
||||||
|
WorkingDirectory=/opt/${APPLICATION}/backend/src
|
||||||
|
ExecStart=fastapi run main.py
|
||||||
|
Restart=always
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
EOF
|
||||||
|
systemctl enable -q --now "${APPLICATION}"
|
||||||
|
msg_ok "Created Service"
|
||||||
|
|
||||||
|
motd_ssh
|
||||||
|
customize
|
||||||
|
|
||||||
|
# Cleanup
|
||||||
|
msg_info "Cleaning up"
|
||||||
|
rm -f "${RELEASE}".zip
|
||||||
|
$STD apt-get -y autoremove
|
||||||
|
$STD apt-get -y autoclean
|
||||||
|
msg_ok "Cleaned"
|
Loading…
x
Reference in New Issue
Block a user