diff --git a/ct/plex.sh b/ct/plex.sh index def84c8e..ef3fd9d6 100644 --- a/ct/plex.sh +++ b/ct/plex.sh @@ -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 </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 diff --git a/install/plex-install.sh b/install/plex-install.sh index 417697cb..d04d20c7 100644 --- a/install/plex-install.sh +++ b/install/plex-install.sh @@ -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 </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"