Inital Upload of original Source

This commit is contained in:
Stian Buch Larsen 2015-05-10 10:50:00 +02:00
parent 40fd9a3f5a
commit 8458b1774c
9 changed files with 127 additions and 2 deletions

7
init/10_dbus.sh Normal file
View file

@ -0,0 +1,7 @@
#!/bin/bash
if [ -e /var/run/dbus/pid ]; then rm -f /var/run/dbus/pid; fi
mkdir -p /var/run/dbus
chown messagebus:messagebus /var/run/dbus
dbus-uuidgen --ensure
sleep 1

16
init/20_update_plex.sh Normal file
View file

@ -0,0 +1,16 @@
#!/bin/bash
export DEBIAN_FRONTEND=noninteractive
INSTALLED=`dpkg-query -W -f='${Version}' plexmediaserver`
if [ -z "$PLEXPASS" ]; then
VERSION=$(curl https://lonix.me/mirror/plex/plexPub.ver)
else
VERSION=$(curl https://lonix.me/mirror/plex/plexPass.ver)
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/

15
init/90_uid_gid_fix.sh Normal file
View file

@ -0,0 +1,15 @@
#!/bin/bash
if [ ! "$(id -u plex)" -eq "$PUID" ]; then usermod -u "$PUID" plex ; fi
if [ ! "$(id -g plex)" -eq "$PGID" ]; then groupmod -g "$PGID" plex ; fi
echo "
-----------------------------------
PLEX GID/UID
-----------------------------------
Plex uid: $(id -u plex)
Plex gid: $(id -g plex)
-----------------------------------
Plex will now continue to boot.
"
sleep 2