Merge pull request #32 from linuxserver/plexcompliance

Plexcompliance
pull/34/head 4
Alex Kretzschmar 9 years ago
commit 950d6b298a

@ -4,9 +4,9 @@ MAINTAINER Stian Larsen <lonixx@gmail.com>
# Install Plex
RUN apt-get -q update && \
PLEXURL=$(curl -s https://tools.linuxserver.io/latest-plex.json| grep "ubuntu64" | cut -d '"' -f 4) && \
apt-get install -qy dbus gdebi-core avahi-daemon wget && \
apt-get install -qy dbus avahi-daemon wget && \
wget -P /tmp "$PLEXURL" && \
gdebi -n /tmp/plexmediaserver_*_amd64.deb && \
dpkg -i /tmp/plexmediaserver_*_amd64.deb && \
rm -f /tmp/plexmediaserver_*_amd64.deb && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
@ -22,4 +22,4 @@ ADD plexmediaserver /defaults/plexmediaserver
#Mappings and ports
VOLUME ["/config", "/transcode"]
EXPOSE 32400
EXPOSE 32400 32400/udp 32469 32469/udp 5353/udp 1900/udp

@ -19,7 +19,6 @@ docker create \
--net=host \
-e VERSION=plexpass \
-e PUID=<UID> -e PGID=<GID> \
-v </path/to/transcode>:/transcode \
-v </path/to/library>:/config \
-v <path/to/tvseries>:/data/tvshows \
-v </path/to/movies>:/data/movies \
@ -30,7 +29,6 @@ docker create \
* `--net=host` - Shares host networking with container, **required**.
* `-v /config` - Plex library location. *This can grow very large, 50gb+ is likely for a large collection.*
* `-v /transcode` *(optional)* - Transcode directory to offload heavy writes in a docker container.
* `-v /data/xyz` - Media goes here. Add as many as needed e.g. `/data/movies`, `/data/tv`, etc.
* `-e VERSION=` - *(optional)* - Permits specific version selection e.g. `0.9.12.4.1192-9a47d21`, also supports `plexpass` or `latest`
* `-e PGID=` for for GroupID - see below for explanation

@ -1,3 +0,0 @@
#!/bin/bash
chown -c abc:abc /transcode

@ -10,18 +10,31 @@ while ! ping -c1 tools.linuxserver.io &>/dev/null; do :; done
#The following error is not an error.
INSTALLED=$(dpkg-query -W -f='${Version}' plexmediaserver)
#Get stuff from things.
PLEX_TOKEN=$( sed -n 's/.*PlexOnlineToken="//p' "/config/Library/Application Support/Plex Media Server/Preferences.xml" | sed "s/\".*//")
[ -z "$PLEX_TOKEN" ] && echo "Plex token not avalible, please login " && exit 0
PLEX_LATEST=$(curl -s "https://plex.tv/downloads/latest/1?channel=8&build=linux-ubuntu-x86_64&distro=ubuntu&X-Plex-Token=$PLEX_TOKEN"| cut -d "/" -f 5 )
[ "$PLEXPASS" ] && echo "PLEXPASS is deprecated, please use VERSION"
if [[ -z $VERSION && "$PLEXPASS" == "1" || $VERSION = "plexpass" ]]; then echo "VERSION=plexpass is depricated please use version latest"; fi
#Start update rutine
if [[ -z $VERSION && "$PLEXPASS" == "1" || $VERSION = "plexpass" ]]; then
VERSION=$(curl -s https://tools.linuxserver.io/latest-plexpass.json | grep "version" | cut -d '"' -f 4)
echo "Using version: $VERSION from Plexpass latest"
elif [[ $VERSION = "latest" || -z $VERSION ]]; then
VERSION=$(curl -s https://tools.linuxserver.io/latest-plex.json| grep "version" | cut -d '"' -f 4)
echo "Using version: $VERSION from Public latest"
if [[ "$VERSION" = latest || "$VERSION" = plexpass ]]; then
VERSION=$PLEX_LATEST
echo "Target version: $VERSION set by: latest\plexpass"
elif [[ -z "$VERSION" ]]; then
echo "Target version: Version not set, Defaulting to supplied version"
else
echo "Using version: $VERSION from Manual"
echo "Target version: $VERSION set by: manually"
fi
last=130
if [[ "$VERSION" == "" ]]; then
echo "ERROR: No version found, running installed version $INSTALLED"
@ -33,7 +46,7 @@ elif [[ "$VERSION" != "$INSTALLED" ]]; then
last=$?
done
apt-get remove --purge -y plexmediaserver
gdebi -n /tmp/plexmediaserver_"${VERSION}"_amd64.deb
dpkg -i /tmp/plexmediaserver_"${VERSION}"_amd64.deb
else
echo "No need to update!"
fi

@ -6,9 +6,6 @@ PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS=6
# ulimit -s $PLEX_MEDIA_SERVER_MAX_STACK_SIZE
PLEX_MEDIA_SERVER_MAX_STACK_SIZE=3000
# where the mediaserver should store the transcodes
PLEX_MEDIA_SERVER_TMPDIR=/transcode
# uncomment to set it to something else
PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR="/config/Library/Application Support"

Loading…
Cancel
Save