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
check_container_storage
check_container_resources
if [[ ! -f /etc/apt/sources.list.d/plexmediaserver.list ]]; then
msg_error "No ${APP} Installation Found!"
exit
if [[ -f /etc/apt/sources.list.d/plexmediaserver.list ]]; then
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
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 \
"2" "Install plexupdate" OFF \
3>&1 1>&2 2>&3)
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
if [[ ! -f /etc/apt/sources.list.d/plexmediaserver.sources ]]; then
msg_error "No ${APP} repository found!"
exit 1
fi
msg_info "Updating ${APP}"
$STD apt update
$STD apt -y -o Dpkg::Options::="--force-confold" upgrade plexmediaserver
msg_ok "Updated ${APP}"
exit
}
start

View File

@ -14,7 +14,7 @@ network_check
update_os
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
chgrp video /dev/dri
chmod 755 /dev/dri
@ -26,12 +26,18 @@ msg_ok "Set Up Hardware Acceleration"
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
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_info "Installing Plex Media Server"
$STD apt-get update
$STD apt-get -o Dpkg::Options::="--force-confold" install -y plexmediaserver
$STD apt update
$STD apt -y -o Dpkg::Options::="--force-confold" install plexmediaserver
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
else
@ -43,6 +49,7 @@ motd_ssh
customize
msg_info "Cleaning up"
$STD apt-get -y autoremove
$STD apt-get -y autoclean
$STD apt -y autoremove
$STD apt -y autoclean
$STD apt -y clean
msg_ok "Cleaned"