more tidying

pull/52/head
sparklyballs 8 years ago
parent c90bb62612
commit 1ed5257235

@ -17,21 +17,22 @@ RUN \
dbus \ dbus \
wget && \ wget && \
# cleanup
apt-get clean && \
rm -rf /tmp/* /var/lib/apt/lists/* /var/tmp/*
# install plex # install plex
RUN \
curl -o \ curl -o \
/tmp/plexmediaserver.deb -L \ /tmp/plexmediaserver.deb -L \
"${PLEX_WWW}" && \ "${PLEX_WWW}" && \
dpkg -i /tmp/plexmediaserver.deb && \ dpkg -i /tmp/plexmediaserver.deb && \
rm -f /tmp/*
# cleanup
apt-get clean && \
rm -rf \
/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/*
# add local files # add local files
COPY root/ / COPY root/ /
# ports and volumes # ports and volumes
VOLUME /config /transcode
EXPOSE 32400 32400/udp 32469 32469/udp 5353/udp 1900/udp EXPOSE 32400 32400/udp 32469 32469/udp 5353/udp 1900/udp
VOLUME /config /transcode

@ -1,9 +1,14 @@
#!/usr/bin/with-contenv bash #!/usr/bin/with-contenv bash
[[ -e /var/run/dbus/pid ]] && rm -f /var/run/dbus/pid # make folders
mkdir -p /var/run/dbus mkdir -p /var/run/dbus
chown messagebus:messagebus /var/run/dbus
# delete existing pid if found
[[ -e /var/run/dbus/pid ]] && \
rm -f /var/run/dbus/pid
# permissions
chown messagebus:messagebus \
/var/run/dbus
dbus-uuidgen --ensure dbus-uuidgen --ensure
sleep 1 sleep 1

@ -1,10 +1,12 @@
#!/usr/bin/with-contenv bash #!/usr/bin/with-contenv bash
# opt out for autoupdates # opt out for autoupdates
[ "$ADVANCED_DISABLEUPDATES" ] && exit 0 [ "$ADVANCED_DISABLEUPDATES" ] && \
exit 0
# set header for no preferences/token message # set header for no preferences/token message
[[ -e /tmp/no-token.nfo ]] && rm /tmp/no-token.nfo [[ -e /tmp/no-token.nfo ]] && \
rm /tmp/no-token.nfo
NOTOKEN_SET='/tmp/no-token.nfo' NOTOKEN_SET='/tmp/no-token.nfo'
cat > "${NOTOKEN_SET}" <<-EOFTOKEN cat > "${NOTOKEN_SET}" <<-EOFTOKEN
@ -39,7 +41,7 @@ cat >> "${NOTOKEN_SET}" <<-EOFTOKEN
EOFTOKEN EOFTOKEN
less /tmp/no-token.nfo echo "$(cat /tmp/no-token.nfo)"
exit 0 exit 0
fi fi
@ -49,7 +51,8 @@ INSTALLED=$(dpkg-query -W -f='${Version}' plexmediaserver)
# start update routine # start update routine
[ "$PLEXPASS" ] && echo "PLEXPASS is deprecated, please use VERSION" [ "$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 if [[ -z $VERSION && "$PLEXPASS" == "1" || $VERSION = "plexpass" ]]; then echo "VERSION=plexpass is depricated please use version latest"; fi
@ -76,9 +79,12 @@ elif [[ "$VERSION" != "$INSTALLED" ]]; then
"${PLEX_URL}/plex-media-server/$VERSION/plexmediaserver_${VERSION}_amd64.deb" "${PLEX_URL}/plex-media-server/$VERSION/plexmediaserver_${VERSION}_amd64.deb"
last=$? last=$?
done done
[[ ! -e /tmp/plexmediaserver_"${VERSION}"_amd64.deb ]] && exit 0 [[ ! -e /tmp/plexmediaserver_"${VERSION}"_amd64.deb ]] && \
apt-get remove --purge -y plexmediaserver exit 0
apt-get remove --purge -y \
plexmediaserver
dpkg -i /tmp/plexmediaserver_"${VERSION}"_amd64.deb dpkg -i /tmp/plexmediaserver_"${VERSION}"_amd64.deb
else else
echo "No need to update!" echo "No need to update!"
fi fi

Loading…
Cancel
Save