Plex Media Server plugin for unRAID (v0.3 - Aug 7 2011)


Recommended Posts

  • Replies 197
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

 

This is what i am using and it works just fine.

 

/boot/custom/plex/plex.sh &> /dev/null |& at now + 1 minute

 

 

If you're truly using that, then you do not need the extra garbage you have. It should only be:

 

/boot/custom/plex/plex.sh &> /dev/null &

Link to comment

 

This is what i am using and it works just fine.

 

/boot/custom/plex/plex.sh &> /dev/null |& at now + 1 minute

 

 

If you're truly using that, then you do not need the extra garbage you have. It should only be:

 

/boot/custom/plex/plex.sh &> /dev/null &

 

Yep thats what i am using and its been working just fine. I will trim the extra off then.

Link to comment

 

This is what i am using and it works just fine.

 

/boot/custom/plex/plex.sh &> /dev/null |& at now + 1 minute

 

Any particular spot in the go script? If i run that manually it sets up the task but Plex never starts.

 

I have it in my go script as the last line in it.

Link to comment

If you do not put the "at now + 1 minute" and you have your Application Support directory or cache directory on a disk that's part of your array, there is a risk that Plex won't start properly or won't be able to find your Library due in part to emhttp not having brought up the array in time.

 

The extra "garbage" is simply used as a failsafe.

Link to comment

This is what my go script looks like, this hold be working correct? Where would i begin to troubleshoot? Any logs anywhere that might tell me why it is not starting automatically? If i navigate to the utils tab and start it manually it starts right up.

 


#!/bin/bash
# Start the Management Utility
/usr/local/sbin/emhttp &

# Wait 1 minute and then start Plex
/boot/custom/plex.sh &> /dev/null |& at now + 1 minute

# Start unRAID Notification System
unraid_notify start

/boot/custom/scripts/SMB_Disable &
/boot/cache_dirs -w -i "Movies" -i "Music"

 

 

Link to comment

If you do not put the "at now + 1 minute" and you have your Application Support directory or cache directory on a disk that's part of your array, there is a risk that Plex won't start properly or won't be able to find your Library due in part to emhttp not having brought up the array in time.

 

The extra "garbage" is simply used as a failsafe.

 

I said garbage because in those 2 specific cases they were NOT executing the command with "at" but were invoking it directly as soon as the go script line is encountered.

Link to comment

This is what my go script looks like, this hold be working correct? Where would i begin to troubleshoot? Any logs anywhere that might tell me why it is not starting automatically? If i navigate to the utils tab and start it manually it starts right up.

 


#!/bin/bash
# Start the Management Utility
/usr/local/sbin/emhttp &

# Wait 1 minute and then start Plex
/boot/custom/plex.sh &> /dev/null |& at now + 1 minute

# Start unRAID Notification System
unraid_notify start

/boot/custom/scripts/SMB_Disable &
/boot/cache_dirs -w -i "Movies" -i "Music"

 

 

No. That should not be working as Stokkes already indicated. You need to echo the command you want to be invoked and pipe that into "at now +1 minute". Once again, it should be:

 

# Wait 1 minute and then start Plex
echo "/boot/custom/plex.sh >/dev/null 2>&1" | at now +1 minute

 

 

Link to comment

Yep that Garbage was working for me, as i was just giving brent112 an example of what i used in my go script. I found that information posted by Stokkes in the start of this thread here  http://lime-technology.com/forum/index.php?topic=14446.msg136384#msg136384 .

 

I have corrected my go script to reflect the following:

 

# Wait 1 minute and then start Plex

echo "/boot/custom/plex/plex.sh >/dev/null 2>&1" | at now +1 minute

 

 

Thanks

Link to comment

I stopped Plex Media Server and ran the command below in the terminal but it did not start PMS after 1 minute. It didn't start it at all. I got this message when I ran the command:  warning: commands will be executed using /bin/sh

 

 

echo "/boot/custom/plex/plex.sh >/dev/null 2>&1" | at now +1 minute

 

 

Link to comment

This is what my go script looks like, this hold be working correct? Where would i begin to troubleshoot? Any logs anywhere that might tell me why it is not starting automatically? If i navigate to the utils tab and start it manually it starts right up.

 


#!/bin/bash
# Start the Management Utility
/usr/local/sbin/emhttp &

# Wait 1 minute and then start Plex
/boot/custom/plex.sh &> /dev/null |& at now + 1 minute

# Start unRAID Notification System
unraid_notify start

/boot/custom/scripts/SMB_Disable &
/boot/cache_dirs -w -i "Movies" -i "Music"

 

 

No. That should not be working as Stokkes already indicated. You need to echo the command you want to be invoked and pipe that into "at now +1 minute". Once again, it should be:

 

# Wait 1 minute and then start Plex
echo "/boot/custom/plex.sh >/dev/null 2>&1" | at now +1 minute

 

Thank you, i was just a little confused because Stokkes original post did not have the part in it about echoing the command. Your command above does in fact work. The error was on my end, I had "/boot/custom/plex.sh" when i should have had "/boot/custom/plex/plex.sh". Thanks for your help.

 

On a side note, is it possible to send remote commands to unRAID to spinup all disks? Maybe an HTTP POST? What if when plex is launched a command is sent to spinup all disks? That way by the time you select a movie there would be zero lag in starting playback.

Link to comment

New Version Released (0.3):

 

v0.3 - August 7, 2011

  • NEW: Add the ability to run Plex as a different user other than "root". Please re-configure your plugin once you've installed this version. Default will still be "root".
  • NEW: New initialization script /boot/custom/plex/init.sh that is auto-generated and starts Plex in the background under the user configured to run the process. Please use this initialization script from now on to start plex in your /boot/config/go. Do not use plex.sh
  • NEW: Preliminary logging to /var/log/plexunraid.log

Link to comment

Stokkes,

 

I updated to 0.3 and started running into the following error located above the start plex button. I also do not get to pick Root Or Noboby and the drop down its just empty. Below is the error i see on the page.

 

Warning: file_get_contents(/boot/config/passwd):

failed to open stream: No such file or directory in /usr/local/emhttp/plugins/webGui/Plex.php on line 262

 

 

I am still at root and i checked the permissions and nothing has changed there.

 

Any Ideas?

 

Thanks

Link to comment

Stokkes,

 

I updated to 0.3 and started running into the following error located above the start plex button. I also do not get to pick Root Or Noboby and the drop down its just empty. Below is the error i see on the page.

 

Warning: file_get_contents(/boot/config/passwd):

failed to open stream: No such file or directory in /usr/local/emhttp/plugins/webGui/Plex.php on line 262

 

 

I am still at root and i checked the permissions and nothing has changed there.

 

Any Ideas?

 

Thanks

 

Weird that you don't have a /boot/config/passwd file.. I've spun a new version of 0.3 that looks for /etc/passwd instead (this will have to exist). Re-download and it should make that error go away.

Link to comment

Upgraded to .3 perfectly. Any advantages and disadvantages of running Plex other that root? Was that implemented for security reasons?

 

Some people wanted to run it as a different user. If you're running your unRAID at home and it's protected behind your internet connection (router, etc), I wouldn't worry about it. It's more of a matter of personal preference for this specific use case.

 

 

Link to comment

Stokkes,

 

I updated to 0.3 and started running into the following error located above the start plex button. I also do not get to pick Root Or Noboby and the drop down its just empty. Below is the error i see on the page.

 

Warning: file_get_contents(/boot/config/passwd):

failed to open stream: No such file or directory in /usr/local/emhttp/plugins/webGui/Plex.php on line 262

 

 

I am still at root and i checked the permissions and nothing has changed there.

 

Any Ideas?

 

Thanks

 

Weird that you don't have a /boot/config/passwd file.. I've spun a new version of 0.3 that looks for /etc/passwd instead (this will have to exist). Re-download and it should make that error go away.

 

Ok trying to download it now.  Have you finished uploading yet?

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.