New Plugin Available: Plex Media Server!

Status
Not open for further replies.

GaiusBaltar

Explorer
Joined
Jan 15, 2014
Messages
61
My 2 cents again. The little upgrade script I threw together still works for me.

Would anyone be interested if I were to flesh the script out more? Where would be the right place to post it?


i would be very interested. and if i may be so bold to make suggestions:
  • perhaps additional cleanup to delete prior .bz2 files for older downloaded versions (so it only keeps the current version's .bz2 file)? this way the script can be set as a cron job and ran automatically and would only update once a new file.
  • A checksum statement to compare the hash of the downloaded .bz2 to the one found via curl (in addition to checking if the file is more than 0 bytes) before attempting to extract it.
  • sendmail statement (optional) to email once the install has completed successfully. (not sure if sendmail in the jail will use the global settings in the host environment though. so this might be more trouble than its worth).
  • check to see if curl (or any other commands that don't come with the jail by default) is installed, and if not, install it (since this script would be most likely run by root in the jail)

just some thoughts I had while playing with it and updating Plex today. i might even play around with the script if i have time this weekend and see if i can get any/all of those features working on my own.
 

Wolfeman0101

Patron
Joined
Jun 14, 2012
Messages
428
It should not matter where the script is located as long as it has write access to /usr/pbi/plexmediaserver-amd64/share

My guess is that your username and/or password have spaces or other special characters and that it is confusing this line of the script

DOWNLOADPAGE=`curl -m 5 -silent -u $USERNAME:$PASSWORD $URL`

try running the following at the Jail command line and see what it spits out:

# curl -m 5 -u yourusername:yourpass https://plex.tv/downloads?channel=plexpass


Code:
root@plex_1:/usr/pbi/plexmediaserver-amd64/share # curl -m 5 -u User:Pass https://plex.tv/downloads?channel=plexpass
curl: No match.
 

Wolfeman0101

Patron
Joined
Jun 14, 2012
Messages
428
i would be very interested. and if i may be so bold to make suggestions:
  • perhaps additional cleanup to delete prior .bz2 files for older downloaded versions (so it only keeps the current version's .bz2 file)? this way the script can be set as a cron job and ran automatically and would only update once a new file.
  • A checksum statement to compare the hash of the downloaded .bz2 to the one found via curl (in addition to checking if the file is more than 0 bytes) before attempting to extract it.
  • sendmail statement (optional) to email once the install has completed successfully. (not sure if sendmail in the jail will use the global settings in the host environment though. so this might be more trouble than its worth).
  • check to see if curl (or any other commands that don't come with the jail by default) is installed, and if not, install it (since this script would be most likely run by root in the jail)

just some thoughts I had while playing with it and updating Plex today. i might even play around with the script if i have time this weekend and see if i can get any/all of those features working on my own.

Love your ideas and maybe make it verbose so we can see what is actually happening.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Well, I just chatted with someone who's fairly noobly with FreeBSD, and he installed Plex in the jail and it was so simple he asked me "wtf is going on to make people so lazy they use the broken and outdated PBI system?" And you know... I had no good answer for him except "they're too lazy to spend a few hours learning how simple it is to install stuff in FreeBSD".

PBIs are for convenience. They aren't for badassness and epeen, which is what many of us want. You want badassness and epeen, you gotta earn that shit!
 

Magnus33

Patron
Joined
May 5, 2013
Messages
429
Lazy for some but in truth its more a matter of people just wanting a quick easy solution similar to store bought nas.

Many simply don't have time or desire to learn which isn't a bad thing since free time is often hard to come by.
 

Cosmo_Kramer

Contributor
Joined
Jan 9, 2013
Messages
103
Lazy for some but in truth its more a matter of people just wanting a quick easy solution similar to store bought nas.

Many simply don't have time or desire to learn which isn't a bad thing since free time is often hard to come by.

I wrote a tutorial on how to install Plex in a FreeNAS Jail, including how to update the Plex port:
http://forums.freenas.org/index.php?threads/tutorial-how-to-install-plex-in-a-jail.19412/

I hope this helps you all.

Edit: I couldn't get the post to not display emoticons, is there any chance someone knows how to fix this? (I'm trying to use :p)
 

panz

Guru
Joined
May 24, 2013
Messages
556

raidflex

Guru
Joined
Mar 14, 2012
Messages
531
It should be excluding the database from change no backing it up.
A regular plex install doesn't back the database up it merely ignores it since nothing in its going to be changed and remounts it when done..

I don't thing the current method is going to work the larger things get .
The more complicated it gets the bigger risk of something breaking.

Yeah, it does take a very long time for my database to update since it is over 60GB is size.
 

Magnus33

Patron
Joined
May 5, 2013
Messages
429
Yeah, it does take a very long time for my database to update since it is over 60GB is size.

I think that what was intended but it appears not to be the case at the moment.
Updating plex should be under five min depending on resources since plex isn't a large program.

But once you toss in the database its one large program suddenly and i think that's the problem they are having.
How to update just the program and keep your database/settings without messing them up.
 

ThreeDee

Guru
Joined
Jun 13, 2013
Messages
700
just updated to the latest version of plex without issue via the "update" buttom .. took about a half hour ..
 

Magnus33

Patron
Joined
May 5, 2013
Messages
429
Update took 5 to 6 hours seems ok but last time it crashed and burned after a few days.

They need to find a way to update that's excludes the database and doesn't kill the preferences.
Then it would be a few minutes and you wouldn't loose anything and of course its easier said then done .:)

Clearly the recent update 9.2.1.2 has speeded the whole thing up as even the delete process has vastly improved.
Still this update method is unlikely to work well in the long term with larger and larger database.
 

panz

Guru
Joined
May 24, 2013
Messages
556
I unlinked the storage before upgrading and stopped the plugin; it took 8 minutes then :) my database is huge, it indexes about 8TB of media.
 

Magnus33

Patron
Joined
May 5, 2013
Messages
429
I unlinked the storage before upgrading and stopped the plugin; it took 8 minutes then :) my database is huge, it indexes about 8TB of media.

Good to know but the kicker here is that's what the updater suppose to do itself already.
Its suppose to unmount storage and stop the plugin when it updates..maybe they didn't get that quite correct hence the overlong update process.
 
Status
Not open for further replies.
Top