11#! /usr/bin/env bash
22
33# Copyright (c) 2021-2025 tteck
4- # Author: tteck
5- # Co-Author: MickLesk (Canbiz)
4+ # Author: MickLesk (Canbiz)
65# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
7- # Source: https://github.com/ErsatzTV/ErsatzTV
6+ # Source: https://ersatztv.org/
87
9- source /dev/stdin <<< " $FUNCTIONS_FILE_PATH"
8+ source /dev/stdin <<< " $FUNCTIONS_FILE_PATH"
109color
1110verb_ip6
1211catch_errors
@@ -15,22 +14,20 @@ network_check
1514update_os
1615
1716msg_info " Installing Dependencies"
18- $STD apt-get install -y curl
19- $STD apt-get install -y sudo
20- $STD apt-get install -y mc
17+ $STD apt-get install -y \
18+ curl \
19+ sudo \
20+ mc
2121msg_ok " Installed Dependencies"
2222
2323msg_info " Installing FFmpeg (Patience)"
24- wget -q https://www.deb-multimedia.org/pool/main/d/deb-multimedia-keyring/deb-multimedia-keyring_2016.8.1_all.deb
25- $STD dpkg -i deb-multimedia-keyring_2016.8.1_all.deb
26- cat << EOF >/etc/apt/sources.list.d/backports.list
27- deb https://www.deb-multimedia.org bookworm main non-free
28- deb https://www.deb-multimedia.org bookworm-backports main
29- EOF
30- $STD apt update
31- DEBIAN_FRONTEND=noninteractive $STD apt-get install -t bookworm-backports ffmpeg -y
32- rm -rf /etc/apt/sources.list.d/backports.list deb-multimedia-keyring_2016.8.1_all.deb
33- $STD apt update
24+ cd /usr/local/bin
25+ wget -q https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz
26+ $STD tar -xvf ffmpeg-release-amd64-static.tar.xz
27+ rm -f ffmpeg-* .tar.xz
28+ cd ffmpeg-*
29+ mv ffmpeg ffprobe /usr/local/bin/
30+ rm -rf /usr/local/bin/ffmpeg-*
3431msg_ok " Installed FFmpeg"
3532
3633msg_info " Setting Up Hardware Acceleration"
@@ -44,10 +41,13 @@ if [[ "$CTTYPE" == "0" ]]; then
4441fi
4542msg_ok " Set Up Hardware Acceleration"
4643
47- msg_info " Installing ErsatzTV"
44+ msg_info " Installing ErsatzTV"
45+ cd /opt
4846RELEASE=$( curl -s https://api.github.com/repos/ErsatzTV/ErsatzTV/releases | grep -oP ' "tag_name": "\K[^"]+' | head -n 1)
49- wget -qO- " https://github.com/ErsatzTV/ErsatzTV/releases/download/${RELEASE} /ErsatzTV-${RELEASE} -linux-x64.tar.gz" | tar -xz -C /opt
50- mv " /opt/ErsatzTV-${RELEASE} -linux-x64" /opt/ErsatzTV
47+ wget -qO- " https://github.com/ErsatzTV/ErsatzTV/releases/download/${RELEASE} /ErsatzTV-${RELEASE} -linux-x64.tar.gz" -O " $temp_file "
48+ tar -xzf " $temp_file "
49+ mv /opt/ErsatzTV-${RELEASE} -linux-x64 /opt/ErsatzTV
50+ echo " ${RELEASE} " > " /opt/${APPLICATION} _version.txt"
5151msg_ok " Installed ErsatzTV"
5252
5353msg_info " Creating Service"
@@ -67,13 +67,14 @@ RestartSec=30
6767[Install]
6868WantedBy=multi-user.target
6969EOF
70- systemctl -q --now enable ersatzTV.service
70+ systemctl enable -q --now ersatzTV
7171msg_ok " Created Service"
7272
7373motd_ssh
7474customize
7575
7676msg_info " Cleaning up"
77+ rm -f ${temp_file}
7778$STD apt-get -y autoremove
7879$STD apt-get -y autoclean
7980msg_ok " Cleaned"
0 commit comments