Welcome to our forums! Please take a few moments to read through our Community Guidelines (also conveniently linked in the header at the top of each page). There, you'll find guidelines on conduct, tips on getting the help you may be searching for, and more!

Official FreeNAS Plugin?

LogicallyRogueLogicallyRogue Members, Plex Pass Posts: 18 Plex Pass

In looking at the PlexPass downloads, it appears that the latest/greatest version of the Plex Media server for FreeBSD is 0.9.9.11.  However, the Plex plugin which is bundled with FreeNAS - a FreeBSD derivative - appears to be stalled at 0.9.9.7.

 

Since there appears to be a new downloadable version for FreeBSD every time a new release happens - would it be possible to also create an official PBI file which could be uploaded into FreeNAS?  This way, Plex better supports PlexPass Premium members who happen to be using FreeNAS [such as me ;) ]

 

Thanks!

 

 

«134

Comments

  • nxdibblesnxdibbles Members, Plex Pass Posts: 6 Plex Pass

    I agree

  • mstinaffmstinaff Members, Plex Pass Posts: 46 Plex Pass

    I think the publicly available plugin will only ever go up to the latest public Plex release.

    For painless updating to the latest Plex Pass version I made this shell script that can be put into a cron job or run manually inside the plugin jail.

    https://github.com/mstinaff/PMS_Updater

    Let me know what you think

  • rlobbinsrlobbins Members, Plex Pass Posts: 176 Plex Pass
    edited June 2014

    I haven't made a script yet like mstinaff has above but this is basically what I run under my plugin jail for freenas to update to the latest plex version when a new version comes out.

    I run the commands as root, so su preceding the following or log into the jail as root.

    mkdir /tmp/src
    cd /tmp/src
    tar xvf PlexMediaServer-0.9.9.12.504-3e7f93c-freebsd-amd64.tar.bz2
    service plexmediaserver stop
    mv /usr/pbi/plexmediaserver-amd64/share/plexmediaserver /usr/pbi/plexmediaserver-amd64/share/plexmediaserver.old
    mkdir /usr/pbi/plexmediaserver-amd64/share/plexmediaserver
    cp -r /tmp/src/PlexMediaServer-0.9.9.12.504-3e7f93c/* /usr/pbi/plexmediaserver-amd64/share/plexmediaserver/
    service plexmediaserver start
     
    Of course after it starts and you verify it runs properly you can remove the old folder.
  • LogicallyRogueLogicallyRogue Members, Plex Pass Posts: 18 Plex Pass
    mstinaff wrote on June 18 2014, 10:11 PM: »

    I think the publicly available plugin will only ever go up to the latest public Plex release.

    For painless updating to the latest Plex Pass version I made this shell script that can be put into a cron job or run manually inside the plugin jail.

    https://github.com/mstinaff/PMS_Updater

    Let me know what you think

    Is there any way to update the reported version number on the Plugin?  For example, you install the FreeNAS Plex Plugin and it says the version is 0.9.9.7 in the FreeNAS interface.  You run your script to upgrade to 0.9.9.10.  Can the version which is displayed in the FreeNAS interface be updated to the new version?

  • ssgoku129ssgoku129 Members, Plex Pass Posts: 25 Plex Pass
    mstinaff wrote on June 18 2014, 10:11 PM: »

    I think the publicly available plugin will only ever go up to the latest public Plex release.

    For painless updating to the latest Plex Pass version I made this shell script that can be put into a cron job or run manually inside the plugin jail.

    https://github.com/mstinaff/PMS_Updater

    Let me know what you think

    I hate to be that guy... but how would I add this to a cronjob? does the shell file go somewhere on the FreeNAS filesystem?

    I tried running "bash PMS_Updater.sh -u xx -p xx" from inside the Plex plugin jail shell but no dice :(

  • mstinaffmstinaff Members, Plex Pass Posts: 46 Plex Pass

    No worries ssgoku129,

    first instead of preceding with bash do a

    # chmod 755 ./PMS_Updater.sh

    I think csh is the default in the plex plugin jail.  Either way I wrote and tested the script against a clean and default plex plugin jail.

    Next try adding a -v to see the output.  As you ran it, the script would silently check the version and download newer if available but not actually apply the update.  -a is needed to automatically apply.

    Once you know it is working properly you can run the following in the jail

    # crontab -e

    which opens an editor for the crontab file.  In there you can add something like this:

    0   4   *   *   5   /path/to/whereever/PMS_Updater.sh -u username -p password -a

    which should run the script every friday at 4 am and apply the update if one is found.  You should probably make sure that this doesn't conflict with any Plex automated tasks.  Also as you can probably tell from my example, it doesn't matter where the script is located.

    If you are still having trouble let me see the output of the command with -v and I'll see what I can find out.

  • ssgoku129ssgoku129 Members, Plex Pass Posts: 25 Plex Pass
    mstinaff wrote on June 24 2014, 3:35 PM: »

    If you are still having trouble let me see the output of the command with -v and I'll see what I can find out.

    Thanks so much! This worked like a charm and now I can start setting up crontab's for updating my Minecraft and Tereria server as well! :)

    Cheers

  • MrMcLargeHugeMrMcLargeHuge Members, Plex Pass Posts: 201 Plex Pass
    edited August 2014
    mstinaff wrote on June 24 2014, 3:35 PM: »

    No worries ssgoku129,

    first instead of preceding with bash do a

    # chmod 755 ./PMS_Updater.sh

    I think csh is the default in the plex plugin jail.  Either way I wrote and tested the script against a clean and default plex plugin jail.

    Next try adding a -v to see the output.  As you ran it, the script would silently check the version and download newer if available but not actually apply the update.  -a is needed to automatically apply.

    Once you know it is working properly you can run the following in the jail

    # crontab -e

    which opens an editor for the crontab file.  In there you can add something like this:

    0   4   *   *   5   /path/to/whereever/PMS_Updater.sh -u username -p password -a

    which should run the script every friday at 4 am and apply the update if one is found.  You should probably make sure that this doesn't conflict with any Plex automated tasks.  Also as you can probably tell from my example, it doesn't matter where the script is located.

    If you are still having trouble let me see the output of the command with -v and I'll see what I can find out.

    EDIT: I figured it out. Total noob ignorance to blame. Laugh if you must, you're justified in doing so.

    To preface, I'm entirely new to running scripts via command line. But, I have downloaded your script, moved it inside my jail (in the root folder), changed the permissions with chmod, and then tried to run it, from the jail command line, with:

    # csh PMS_Updater.sh
    

    In the output, I get this:

    URL=https://plex.tv/downloads?channel=plexpass: Command not found.              
    DOWNLOADPATH=/tmp: Command not found.                                           
    PMSPARENTPATH=/usr/pbi/plexmediaserver-amd64/share: Command not found.          
    PMSLIVEFOLDER=plexmediaserver: Command not found.                               
    PMSBAKFOLDER=plexmediaserver.bak: Command not found.                            
    PMSPATTERN=PlexMediaServer-[0-9]*.[0-9]*.[0-9]*.[0-9]*.[0-9]*-[0-9,a-f]*-freebsd
    -amd64.tar.bz2: Command not found.                                              
    CERTFILE=/usr/local/share/certs/ca-root-nss.crt: Command not found.             
    AUTOUPDATE=0: Command not found.                                                
    FORCEUPDATE=0: Command not found.                                               
    VERBOSE=0: Command not found.                                                   
    REMOVE=0: Command not found.                                                    
    CURRENTVER=9999.9999.9999.9999.9999: Command not found. 
    

    I'm sure I'm just making a stupid, simple mistake, but I have no idea what it is. Any help is greatly appreciated.

    PMS: Custom FreeNAS (QuadCore Xeon, 16TB usable storage with RAIDZ2 double-redundancy)

    MacBrook Pro

    iPhone 5s

    Chromecast

    Samsung Blu-ray via DLNA

  • mstinaffmstinaff Members, Plex Pass Posts: 46 Plex Pass
    edited August 2014

    once you've run chmod 755 the PMS_Updater.sh file is marked as executable and you should run it directly.  i.e.

    # PMS_Updater.sh 

    using csh on the command line to invoke it is causing it to read the file as a list of command line commands and not as a script.

    MrMcLargeHuge wrote on August 1 2014, 1:42 AM: »

    To preface, I'm entirely new to running scripts via command line. But, I have downloaded your script, moved it inside my jail (in the root folder), changed the permissions with chmod, and then tried to run it, from the jail command line, with:

    # csh PMS_Updater.sh
    

    Update:

    So as not to mis-inform. the default shell in the jail /bin/sh  is different than /bin/csh sooo......

    you could run

    # /bin/sh PMS_Updater.sh

    and have it work.  But what I said before is still true after the chmod you can just run

    # PMS_Updater.sh

    and it will run.

  • wongdongfuwongdongfu Members, Plex Pass Posts: 11 Plex Pass

    mstinaff,

    Thanks for providing a script for all us newbies to be able to update our media servers...

    But I am unable to get it to run,

    I have ssh into freeness as root

    then change to my jail  -   jexec 1 csh

    then opened up nano and pasted in your script and saved it as PMS_Updater.sh in the root of the jail

    then ran chmod 755 PMS_Updater.sh

    when I try to run the PMS_Updater.sh -u user -p password I get

    PMS_Updater.sh: command not found

    I was able to follow rlobbins instructions in this same post and update manually. But I would really like to be able to use the Mstinaff script and update to the latest plexpass version automatically.

    Anyone have any ideas where I am **** up. I am sure its a simple thing that my newbie BSD skills are missing

    Thanks in advance 

  • mstinaffmstinaff Members, Plex Pass Posts: 46 Plex Pass

    try with a ./ in front  

    # ./PMS_Updater.sh

    or an explicit path

    # /PMS_Updater.sh

  • wongdongfuwongdongfu Members, Plex Pass Posts: 11 Plex Pass

    when I try with the /PMS_Updater.sh I get ( I took out my username and password)

    root@plexmediaserver_1:/ # /PMS_Updater.sh 

    /PMS_Updater.sh: version: not found

    /PMS_Updater.sh: zeros: not found

    /PMS_Updater.sh: older: not found

    /PMS_Updater.sh: 0: not found

    /PMS_Updater.sh: download: not found

    /PMS_Updater.sh: zip: not found

    /PMS_Updater.sh: files: not found

    wget: missing URL

    Usage: wget [OPTION]... [url]...

     

    Try `wget --help' for more options.

    /PMS_Updater.sh: --ca-certificate=/usr/local/share/certs/ca-root-nss.crt: not found

    /PMS_Updater.sh: --directory-prefix=/tmp: not found

    Error downloading https://plex.tv/downloads?channel=plexpass

     

    when I try the ./PMS_Updater.sh

     

    root@plexmediaserver_1:/ # ./PMS_Updater.sh 

    ./PMS_Updater.sh: version: not found

    ./PMS_Updater.sh: zeros: not found

    ./PMS_Updater.sh: older: not found

    ./PMS_Updater.sh: 0: not found

    ./PMS_Updater.sh: download: not found

    ./PMS_Updater.sh: zip: not found

    ./PMS_Updater.sh: files: not found

    wget: missing URL

    Usage: wget [OPTION]... [/url][url]...

     

    Try `wget --help' for more options.

    ./PMS_Updater.sh: --ca-certificate=/usr/local/share/certs/ca-root-nss.crt: not found

    ./PMS_Updater.sh: --directory-prefix=/tmp: not found

    Error downloading https://plex.tv/downloads?channel=plexpass

    root@plexmediaserver_1:/ # 

     
     
    Thanks for any other thoughts you may have .. I do not have great BSD skills yet.
     
     
    [/url]
  • mstinaffmstinaff Members, Plex Pass Posts: 46 Plex Pass
    edited August 2014

    To rule out a copy paste error can you try downloading the script directly: 
     

    #  wget --ca-certificate=/usr/local/share/certs/ca-root-nss.crt \
    https://raw.githubusercontent.com/mstinaff/PMS_Updater/master/PMS_Updater.sh

    you will still need to run chmod 755 on it.

  • wongdongfuwongdongfu Members, Plex Pass Posts: 11 Plex Pass

    Mstinaff

    That did it ... 

    I use a mac -  so maybe that had something to do with the copy / past error!!! 

    thank you so much for the help!!

  • SkyphoxSkyphox Members, Plex Pass Posts: 51 Plex Pass

    This is a very interesting topic. I have just subscribed to Plex Pass and see I now have access to newer builds.

    Can I just get this clear, using the method described here, I can upgrade my current FreeNAS Plex build to the FreeBSD build available to plex pass members? Without any compatibility issues?

  • NucshucoNucshuco Members Posts: 3 ✭✭
    LogicallyRogue wrote on June 23 2014, 2:52 PM: »

    Is there any way to update the reported version number on the Plugin?  For example, you install the FreeNAS Plex Plugin and it says the version is 0.9.9.7 in the FreeNAS interface.  You run your script to upgrade to 0.9.9.10.  Can the version which is displayed in the FreeNAS interface be updated to the new version?

    Hi LogicallyRogue

    Did you ever figure out a way to do this?

  • BrianDMGBrianDMG Members, Plex Pass Posts: 39 Plex Pass

    Looks like starting with today's release, they changed the URL structure for the update downloads, which breaks the PMS_Update script. Anyone have any idea how to fix that in the script?

  • WassupdocWassupdoc Members, Plex Pass Posts: 13 Plex Pass
    BrianDMG wrote on September 9 2014, 2:36 AM: »

    Looks like starting with today's release, they changed the URL structure for the update downloads, which breaks the PMS_Update script. Anyone have any idea how to fix that in the script?

    Lol I just read through the first posts and got it downloaded and running.  Of course at the end of the thread I read this last message.

    I get this error myself:

    Searching https://plex.tv/downloads?channel=plexpass for PlexMediaServer-[0-9]*.[0-9]*.[0-9]*.[0-9]*.[0-9]*-[0-9,a-f]*-freebsd-amd64.tar.bz2 .....Could not find a PlexMediaServer-[0-9]*.[0-9]*.[0-9]*.[0-9]*.[0-9]*-[0-9,a-f]*-freebsd-amd64.tar.bz2 download link on page https://plex.tv/downloads?channel=plexpass
    
  • mstinaffmstinaff Members, Plex Pass Posts: 46 Plex Pass
    I'll check it out once I get home tonight and see if I can get it ironed out.
  • BrianDMGBrianDMG Members, Plex Pass Posts: 39 Plex Pass
    Wassupdoc wrote on September 9 2014, 3:08 AM: »

    Lol I just read through the first posts and got it downloaded and running.  Of course at the end of the thread I read this last message.

    I get this error myself:

    Searching https://plex.tv/downloads?channel=plexpass for PlexMediaServer-[0-9]*.[0-9]*.[0-9]*.[0-9]*.[0-9]*-[0-9,a-f]*-freebsd-amd64.tar.bz2 .....Could not find a PlexMediaServer-[0-9]*.[0-9]*.[0-9]*.[0-9]*.[0-9]*-[0-9,a-f]*-freebsd-amd64.tar.bz2 download link on page https://plex.tv/downloads?channel=plexpass
    

    That's what I was talking about. They changed the way they were sorting their downloads (URL-wise, there are extra folders now), so now it's spitting out garbage. I spent a little bit trying to edit the URLs in the .sh on my nas box, to no avail. I'm sure this can be fixed by someone who's more familiar with FreeBSD than I am, so hopefully that happens. Awesome script before tonight.

«134
Sign In or Register to comment.