Skip to content

Instantly share code, notes, and snippets.

@jpadhye
Last active February 4, 2017 06:23
Show Gist options
  • Save jpadhye/40ff763aafe07bd4efe3da95ccea31b0 to your computer and use it in GitHub Desktop.
Save jpadhye/40ff763aafe07bd4efe3da95ccea31b0 to your computer and use it in GitHub Desktop.
Update Plex channels on Ubuntu 14.04 LTS based PlexServer
# Execute as sudo ./updatePlexChannels.sh
set -e
set -x
#Stop PMS
service plexmediaserver stop
#This variable will work with standard installation of plex on Ubuntu 14 LTS.
#Set this correctly on other platforms and it should still work.
PLEX_HOME=/var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server
#Delete Plugin Logs
rm -rf /var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Logs/PMS\ Plugin\ Logs/*
for ChannelName in NationalGeographic ABC FOX CNN TED-Talks CBS; do
rm -rf ${ChannelName}.bundle
git clone https://github.com/plexinc-plugins/${ChannelName}.bundle.git || exit 1
rm -rf "${PLEX_HOME}/Plug-ins/${ChannelName}.bundle"
mv "${ChannelName}.bundle" "${PLEX_HOME}/Plug-ins/"
done
for ChannelName in Einthusan; do
rm -rf ${ChannelName}.bundle
git clone https://github.com/coder-alpha/${ChannelName}.bundle.git || exit 1
rm -rf "${PLEX_HOME}/Plug-ins/${ChannelName}.bundle"
mv "${ChannelName}.bundle" "${PLEX_HOME}/Plug-ins/"
done
# Set correct permissions
chown plex:plex -R "${PLEX_HOME}/Plug-ins"
#Restart PMS
service plexmediaserver start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment