Skip to content

Commit be8df04

Browse files
authored
Merge pull request #27 from ryanakata/master
Script update for iocage jails
2 parents 33973dc + 17a6efe commit be8df04

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

PMS_Updater.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ URLPLEXPASS="https://plex.tv/api/downloads/5.json?channel=plexpass"
55
DOWNLOADPATH="/tmp"
66
LOGPATH="/tmp"
77
LOGFILE="PMS_Updater.log"
8-
PMSPARENTPATH="/usr/pbi/plexmediaserver-amd64/share"
9-
PMSLIVEFOLDER="plexmediaserver"
10-
PMSBAKFOLDER="plexmediaserver.bak"
8+
PMSPARENTPATH="/usr/local/share"
9+
PMSLIVEFOLDER="plexmediaserver-plexpass"
10+
PMSBAKFOLDER="plexmediaserver-plexpass.bak"
1111
CERTFILE="/usr/local/share/certs/ca-root-nss.crt"
1212
AUTOUPDATE=0
1313
FORCEUPDATE=0
@@ -191,7 +191,7 @@ applyUpdate()
191191
rm -rf $PMSPARENTPATH/$PMSBAKFOLDER 2>&1 | LogMsg
192192
echo Done. | LogMsg -f
193193
echo Stopping Plex Media Server .....| LogMsg -n
194-
service plexmediaserver stop 2>&1 | LogMsg
194+
service plexmediaserver_plexpass stop 2>&1
195195
echo Done. | LogMsg -f
196196
echo Moving current Plex Media Server to backup location .....| LogMsg -n
197197
mv $PMSPARENTPATH/$PMSLIVEFOLDER/ $PMSPARENTPATH/$PMSBAKFOLDER/ 2>&1 | LogMsg
@@ -209,7 +209,7 @@ applyUpdate()
209209
ln -s $PMSPARENTPATH/$PMSLIVEFOLDER/Plex\ Media\ Server $PMSPARENTPATH/$PMSLIVEFOLDER/Plex_Media_Server 2>&1 | LogMsg
210210
ln -s $PMSPARENTPATH/$PMSLIVEFOLDER/libpython2.7.so.1 $PMSPARENTPATH/$PMSLIVEFOLDER/libpython2.7.so 2>&1 | LogMsg
211211
echo Starting Plex Media Server .....| LogMsg -n
212-
service plexmediaserver start
212+
service plexmediaserver_plexpass start
213213
echo Done. | LogMsg -f
214214
}
215215

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ PMS_Updater.sh is a shell script for updating the Plex Media Server inside the F
55

66
---
77

8+
This script has been updated to work in a iocage jail in FreeNAS 11.2. Please ensure you have wget and ca_root_nss installed. To do so, from inside the jail (iocage exec plex csh) just run "pkg install wget" and the same for ca_root_nss.
9+
10+
Copy the file into the root of the directory however you like and you can then run it from within the jail to update it. Thanks to @sretalla at the FreeNAS forums for all the help provided.
11+
812
<a href="http://www.freenas.org/">FreeNAS</a> is an excellent open-source network attached storage project based on FreeBSD that is very capable of storing even the largest media libraries
913

1014
<a href="http://plex.tv">Plex</a> is an amazing media server/client platform that can organize and stream those same media libraries.

0 commit comments

Comments
 (0)