Skip to content

Commit 5fec573

Browse files
Tunarr (#7735)
* 'Add new script' * Refactor Intel Hardware Acceleration installation script * Refactor hardware acceleration setup in tunarr-install.sh Updated prompts and adjusted user group permissions for hardware acceleration setup. --------- Co-authored-by: push-app-to-main[bot] <203845782+push-app-to-main[bot]@users.noreply.github.com> Co-authored-by: CanbiZ <[email protected]>
1 parent ebd269a commit 5fec573

File tree

4 files changed

+221
-0
lines changed

4 files changed

+221
-0
lines changed

ct/headers/tunarr

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
______
2+
/_ __/_ ______ ____ ___________
3+
/ / / / / / __ \/ __ `/ ___/ ___/
4+
/ / / /_/ / / / / /_/ / / / /
5+
/_/ \__,_/_/ /_/\__,_/_/ /_/
6+

ct/tunarr.sh

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
#!/usr/bin/env bash
2+
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
3+
# Copyright (c) 2021-2025 community-scripts ORG
4+
# Author: chrisbenincasa
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://tunarr.com/
7+
8+
APP="Tunarr"
9+
var_tags="${var_tags:-iptv}"
10+
var_cpu="${var_cpu:-2}"
11+
var_ram="${var_ram:-1024}"
12+
var_disk="${var_disk:-5}"
13+
var_os="${var_os:-debian}"
14+
var_version="${var_version:-13}"
15+
var_unprivileged="${var_unprivileged:-1}"
16+
17+
header_info "$APP"
18+
variables
19+
color
20+
catch_errors
21+
function update_script() {
22+
header_info
23+
check_container_storage
24+
check_container_resources
25+
if [[ ! -d /opt/tunarr ]]; then
26+
msg_error "No ${APP} Installation Found!"
27+
exit
28+
fi
29+
if check_for_gh_release "tunarr" "chrisbenincasa/tunarr"; then
30+
msg_info "Stopping Service"
31+
systemctl stop tunarr
32+
msg_ok "Stopped Service"
33+
34+
msg_info "Creating Backup"
35+
if [ -d "/usr/local/share/tunarr" ]; then
36+
tar -czf "/opt/${APP}_backup_$(date +%F).tar.gz" /usr/local/share/tunarr $STD
37+
msg_ok "Backup Created"
38+
else
39+
msg_error "Backup failed: /usr/local/share/tunarr does not exist"
40+
fi
41+
42+
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "tunarr" "chrisbenincasa/tunarr" "singlefile" "latest" "/opt/tunarr" "*linux-x64"
43+
44+
msg_info "Starting Service"
45+
systemctl start tunarr
46+
msg_ok "Started Service"
47+
msg_ok "Update Successfully"
48+
fi
49+
50+
if check_for_gh_release "ersatztv-ffmpeg" "ErsatzTV/ErsatzTV-ffmpeg"; then
51+
msg_info "Stopping Service"
52+
systemctl stop tunarr
53+
msg_ok "Stopped Service"
54+
55+
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "ersatztv-ffmpeg" "ErsatzTV/ErsatzTV-ffmpeg" "prebuild" "latest" "/opt/ErsatzTV-ffmpeg" "*-linux64-gpl-7.1.tar.xz"
56+
57+
msg_info "Set ErsatzTV-ffmpeg links"
58+
chmod +x /opt/ErsatzTV-ffmpeg/bin/*
59+
ln -sf /opt/ErsatzTV-ffmpeg/bin/ffmpeg /usr/local/bin/ffmpeg
60+
ln -sf /opt/ErsatzTV-ffmpeg/bin/ffplay /usr/local/bin/ffplay
61+
ln -sf /opt/ErsatzTV-ffmpeg/bin/ffprobe /usr/local/bin/ffprobe
62+
msg_ok "ffmpeg links set"
63+
64+
msg_info "Starting Service"
65+
systemctl start tunarr
66+
msg_ok "Started Service"
67+
msg_ok "Update Successfully"
68+
fi
69+
exit
70+
}
71+
72+
start
73+
build_container
74+
description
75+
76+
msg_ok "Completed Successfully!\n"
77+
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
78+
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
79+
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8000${CL}"

frontend/public/json/tunarr.json

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"name": "Tunarr",
3+
"slug": "tunarr",
4+
"categories": [
5+
13
6+
],
7+
"date_created": "2025-09-06",
8+
"type": "ct",
9+
"updateable": true,
10+
"privileged": false,
11+
"config_path": "/opt/tunarr/.env",
12+
"interface_port": 8000,
13+
"documentation": "https://tunarr.com/",
14+
"website": "https://tunarr.com/",
15+
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/tunarr.webp",
16+
"description": "Create a classic TV experience using your own media - IPTV backed by Plex/Jellyfin/Emby.",
17+
"install_methods": [
18+
{
19+
"type": "default",
20+
"script": "ct/tunarr.sh",
21+
"resources": {
22+
"cpu": 2,
23+
"ram": 1024,
24+
"hdd": 5,
25+
"os": "Debian",
26+
"version": "13"
27+
}
28+
}
29+
],
30+
"default_credentials": {
31+
"username": null,
32+
"password": null
33+
},
34+
"notes": []
35+
}

install/tunarr-install.sh

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright (c) 2021-2025 tteck
4+
# Author: chrisbenincasa
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://tunarr.com/
7+
8+
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
9+
color
10+
verb_ip6
11+
catch_errors
12+
setting_up_container
13+
network_check
14+
update_os
15+
16+
msg_info "Setting Up Hardware Acceleration"
17+
if [[ "$CTTYPE" == "0" ]]; then
18+
$STD adduser "$(id -un)" video
19+
$STD adduser "$(id -un)" render
20+
fi
21+
msg_ok "Base Hardware Acceleration Set Up"
22+
23+
read -r -p "${TAB3}Do you need the intel-media-va-driver-non-free driver for HW encoding (Debian 13 only)? <y/N> " prompt
24+
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
25+
msg_info "Installing Intel Hardware Acceleration (non-free)"
26+
cat <<'EOF' >/etc/apt/sources.list.d/non-free.sources
27+
Types: deb deb-src
28+
URIs: http://deb.debian.org/debian
29+
Suites: trixie
30+
Components: non-free non-free-firmware
31+
32+
Types: deb deb-src
33+
URIs: http://deb.debian.org/debian-security
34+
Suites: trixie-security
35+
Components: non-free non-free-firmware
36+
37+
Types: deb deb-src
38+
URIs: http://deb.debian.org/debian
39+
Suites: trixie-updates
40+
Components: non-free non-free-firmware
41+
EOF
42+
43+
$STD apt update
44+
$STD apt -y install \
45+
intel-media-va-driver-non-free \
46+
ocl-icd-libopencl1 \
47+
mesa-opencl-icd \
48+
mesa-va-drivers \
49+
libvpl2 \
50+
vainfo \
51+
intel-gpu-tools
52+
else
53+
msg_info "Installing Intel Hardware Acceleration (open packages)"
54+
$STD apt -y install \
55+
va-driver-all \
56+
ocl-icd-libopencl1 \
57+
mesa-opencl-icd \
58+
mesa-va-drivers \
59+
vainfo \
60+
intel-gpu-tools
61+
fi
62+
msg_ok "Installed and Set Up Intel Hardware Acceleration"
63+
64+
fetch_and_deploy_gh_release "tunarr" "chrisbenincasa/tunarr" "singlefile" "latest" "/opt/tunarr" "*linux-x64"
65+
fetch_and_deploy_gh_release "ersatztv-ffmpeg" "ErsatzTV/ErsatzTV-ffmpeg" "prebuild" "latest" "/opt/ErsatzTV-ffmpeg" "*-linux64-gpl-7.1.tar.xz"
66+
67+
msg_info "Set ErsatzTV-ffmpeg links"
68+
chmod +x /opt/ErsatzTV-ffmpeg/bin/*
69+
ln -sf /opt/ErsatzTV-ffmpeg/bin/ffmpeg /usr/bin/ffmpeg
70+
ln -sf /opt/ErsatzTV-ffmpeg/bin/ffplay /usr/bin/ffplay
71+
ln -sf /opt/ErsatzTV-ffmpeg/bin/ffprobe /usr/bin/ffprobe
72+
msg_ok "ffmpeg links set"
73+
74+
msg_info "Creating Service"
75+
cat <<EOF >/etc/systemd/system/tunarr.service
76+
[Unit]
77+
Description=Tunarr Service
78+
After=multi-user.target
79+
80+
[Service]
81+
Type=simple
82+
User=root
83+
WorkingDirectory=/opt/tunarr
84+
ExecStart=/opt/tunarr/tunarr
85+
Restart=always
86+
RestartSec=30
87+
88+
[Install]
89+
WantedBy=multi-user.target
90+
EOF
91+
systemctl enable -q --now tunarr
92+
msg_ok "Created Service"
93+
94+
motd_ssh
95+
customize
96+
97+
msg_info "Cleaning up"
98+
$STD apt -y autoremove
99+
$STD apt -y autoclean
100+
$STD apt -y clean
101+
msg_ok "Cleaned"

0 commit comments

Comments
 (0)