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