Migrate Plex repo to Deb822 and update install scripts

Updated plex-install.sh and plex.sh to use the Deb822 repository format for Plex Media Server, replacing the old sources.list method. Also switched apt-get commands to apt for consistency and improved update/cleanup steps.
This commit is contained in:
CanbiZ 2025-10-02 10:09:47 +02:00
parent 7456d8bf5a
commit e2ec7c18e2
2 changed files with 36 additions and 24 deletions

View File

@ -23,26 +23,31 @@ function update_script() {
header_info header_info
check_container_storage check_container_storage
check_container_resources check_container_resources
if [[ ! -f /etc/apt/sources.list.d/plexmediaserver.list ]]; then
msg_error "No ${APP} Installation Found!" if [[ -f /etc/apt/sources.list.d/plexmediaserver.list ]]; then
exit msg_info "Migrating Plex repository to Deb822 format"
rm -f /etc/apt/sources.list.d/plexmediaserver.list
curl -fsSL https://downloads.plex.tv/plex-keys/PlexSign.key | tee /usr/share/keyrings/PlexSign.asc >/dev/null
cat <<EOF >/etc/apt/sources.list.d/plexmediaserver.sources
Types: deb
URIs: https://downloads.plex.tv/repo/deb/
Suites: public
Components: main
Signed-By: /usr/share/keyrings/PlexSign.asc
EOF
msg_ok "Migrated Plex repository to Deb822"
fi fi
UPD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select \nplexupdate info >> https://github.com/mrworf/plexupdate" 10 59 2 \
"1" "Update LXC" ON \ if [[ ! -f /etc/apt/sources.list.d/plexmediaserver.sources ]]; then
"2" "Install plexupdate" OFF \ msg_error "No ${APP} repository found!"
3>&1 1>&2 2>&3) exit 1
if [ "$UPD" == "1" ]; then
msg_info "Updating ${APP} LXC"
$STD apt-get update
$STD apt-get -y upgrade
msg_ok "Updated ${APP} LXC"
exit
fi
if [ "$UPD" == "2" ]; then
set +e
bash -c "$(curl -fsSL https://raw.githubusercontent.com/mrworf/plexupdate/master/extras/installer.sh)"
exit
fi fi
msg_info "Updating ${APP}"
$STD apt update
$STD apt -y -o Dpkg::Options::="--force-confold" upgrade plexmediaserver
msg_ok "Updated ${APP}"
exit
} }
start start

View File

@ -14,7 +14,7 @@ network_check
update_os update_os
msg_info "Setting Up Hardware Acceleration" msg_info "Setting Up Hardware Acceleration"
$STD apt-get -y install {va-driver-all,ocl-icd-libopencl1,intel-opencl-icd,vainfo,intel-gpu-tools} $STD apt -y install va-driver-all ocl-icd-libopencl1 intel-opencl-icd vainfo intel-gpu-tools
if [[ "$CTTYPE" == "0" ]]; then if [[ "$CTTYPE" == "0" ]]; then
chgrp video /dev/dri chgrp video /dev/dri
chmod 755 /dev/dri chmod 755 /dev/dri
@ -26,12 +26,18 @@ msg_ok "Set Up Hardware Acceleration"
msg_info "Setting Up Plex Media Server Repository" msg_info "Setting Up Plex Media Server Repository"
curl -fsSL https://downloads.plex.tv/plex-keys/PlexSign.key | tee /usr/share/keyrings/PlexSign.asc >/dev/null curl -fsSL https://downloads.plex.tv/plex-keys/PlexSign.key | tee /usr/share/keyrings/PlexSign.asc >/dev/null
echo "deb [signed-by=/usr/share/keyrings/PlexSign.asc] https://downloads.plex.tv/repo/deb/ public main" >/etc/apt/sources.list.d/plexmediaserver.list cat <<EOF >/etc/apt/sources.list.d/plexmediaserver.sources
Types: deb
URIs: https://downloads.plex.tv/repo/deb/
Suites: public
Components: main
Signed-By: /usr/share/keyrings/PlexSign.asc
EOF
msg_ok "Set Up Plex Media Server Repository" msg_ok "Set Up Plex Media Server Repository"
msg_info "Installing Plex Media Server" msg_info "Installing Plex Media Server"
$STD apt-get update $STD apt update
$STD apt-get -o Dpkg::Options::="--force-confold" install -y plexmediaserver $STD apt -y -o Dpkg::Options::="--force-confold" install plexmediaserver
if [[ "$CTTYPE" == "0" ]]; then if [[ "$CTTYPE" == "0" ]]; then
sed -i -e 's/^ssl-cert:x:104:plex$/render:x:104:root,plex/' -e 's/^render:x:108:root$/ssl-cert:x:108:plex/' /etc/group sed -i -e 's/^ssl-cert:x:104:plex$/render:x:104:root,plex/' -e 's/^render:x:108:root$/ssl-cert:x:108:plex/' /etc/group
else else
@ -43,6 +49,7 @@ motd_ssh
customize customize
msg_info "Cleaning up" msg_info "Cleaning up"
$STD apt-get -y autoremove $STD apt -y autoremove
$STD apt-get -y autoclean $STD apt -y autoclean
$STD apt -y clean
msg_ok "Cleaned" msg_ok "Cleaned"