August 6, 201114 yr 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.
August 6, 201114 yr 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 &
August 6, 201114 yr 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.
August 6, 201114 yr 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.
August 6, 201114 yr 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.
August 6, 201114 yr 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"
August 6, 201114 yr 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.
August 6, 201114 yr 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
August 6, 201114 yr 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
August 6, 201114 yr 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
August 7, 201114 yr 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
August 7, 201114 yr 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.
August 7, 201114 yr 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
August 7, 201114 yr Thanks Sokkes, nice work! I took your package and build my one for SABnzbd from it. Thanks for Inspiration. good night, spidi
August 7, 201114 yr 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.
August 8, 201114 yr 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".
August 8, 201114 yr 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
August 8, 201114 yr Upgraded to .3 perfectly. Any advantages and disadvantages of running Plex other that root? Was that implemented for security reasons?
August 8, 201114 yr 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.
August 8, 201114 yr 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.
August 8, 201114 yr 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?
August 8, 201114 yr Author Good thing you asked.. Dropbox is still "syncing".. wait about an hour (my upload is really slow).
August 8, 201114 yr 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.