Some cleanup
This commit is contained in:
parent
1e777b5d55
commit
61f92ad0ea
1 changed files with 9 additions and 35 deletions
|
|
@ -1,11 +1,9 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
INSTALLED=`dpkg-query -W -f='${Version}' plexmediaserver`
|
INSTALLED=$(dpkg-query -W -f='${Version}' plexmediaserver)
|
||||||
|
|
||||||
if [[ "$PLEXPASS" ]]; then
|
[ "$PLEXPASS" ] && echo "PLEXPASS is deprecated, please use VERSION"
|
||||||
echo "PLEXPASS is depricated, please use VERSION"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -z $VERSION && "$PLEXPASS" == "1" || $VERSION = "plexpass" ]]; then
|
if [[ -z $VERSION && "$PLEXPASS" == "1" || $VERSION = "plexpass" ]]; then
|
||||||
VERSION=$(curl -s https://tools.linuxserver.io/latest-plexpass.json | grep "version" | cut -d '"' -f 4)
|
VERSION=$(curl -s https://tools.linuxserver.io/latest-plexpass.json | grep "version" | cut -d '"' -f 4)
|
||||||
|
|
@ -26,32 +24,8 @@ if [[ "$VERSION" != "$INSTALLED" ]]; then
|
||||||
last=$?
|
last=$?
|
||||||
done
|
done
|
||||||
apt-get remove --purge -y plexmediaserver
|
apt-get remove --purge -y plexmediaserver
|
||||||
gdebi -n /tmp/plexmediaserver_${VERSION}_amd64.deb
|
gdebi -n /tmp/plexmediaserver_"${VERSION}"_amd64.deb
|
||||||
else
|
else
|
||||||
echo "Allready Uptodate"
|
echo "No need to update!"
|
||||||
fi
|
fi
|
||||||
cp -v /defaults/plexmediaserver /etc/default/plexmediaserver
|
cp -v /defaults/plexmediaserver /etc/default/plexmediaserver
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# INSTALLED=`dpkg-query -W -f='${Version}' plexmediaserver`
|
|
||||||
# if [ $VERSION ]; then
|
|
||||||
# echo "Useing version: $VERSION from Manual"
|
|
||||||
# elif [ "$PLEXPASS" == "1" ]; then
|
|
||||||
# VERSION=$(curl -s https://tools.linuxserver.io/latest-plexpass.json | grep "version" | cut -d '"' -f 4)
|
|
||||||
# echo "Useing version: $VERSION from Plexpass latest"
|
|
||||||
# else
|
|
||||||
# VERSION=$(curl -s https://tools.linuxserver.io/latest-plex.json| grep "version" | cut -d '"' -f 4)
|
|
||||||
# echo "Useing version: $VERSION from Public latest"
|
|
||||||
# fi
|
|
||||||
# if [ "$VERSION" == "$INSTALLED" ]; then
|
|
||||||
# exit 0;
|
|
||||||
# fi
|
|
||||||
# mv /etc/default/plexmediaserver /tmp/
|
|
||||||
# apt-get remove --purge -y plexmediaserver
|
|
||||||
# wget -P /tmp "http://downloads.plexapp.com/plex-media-server/$VERSION/plexmediaserver_${VERSION}_amd64.deb"
|
|
||||||
# gdebi -n /tmp/plexmediaserver_${VERSION}_amd64.deb
|
|
||||||
# mv /tmp/plexmediaserver /etc/default/
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue