Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

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

Featured Replies

 

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.

  • Replies 197
  • Views 99.1k
  • Created
  • Last Reply

 

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 &

 

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.

 

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.

  • Author

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.

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"

 

 

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.

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

 

 

  • Author

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.

 

Understood  :D

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

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

 

 

anyone else having trouble adding m4a AAC files?

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.

  • Author

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

just installed v0.3. works great.

thank you for your work!

Thanks Sokkes,

 

nice work!

 

I took your package and build my one for SABnzbd from it. Thanks for Inspiration.  :D

 

good night, spidi

 

 

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".

 

Would we have to "chown" an existing library for this to work.

 

Cheers.

  • Author

Yes.

 

I thought about putting a chown function automatically, but depending on your system, it can take a while. Wouldn't want people to think the UI "hung".

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

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

  • Author

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.

  • Author

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.

 

 

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?

  • Author

Good thing you asked.. Dropbox is still "syncing".. wait about an hour (my upload is really slow).

Good thing you asked.. Dropbox is still "syncing".. wait about an hour (my upload is really slow).

 

Ok will do!

 

Thanks

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.