brent112 Posted August 6, 2011 Share Posted August 6, 2011 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. Quote Link to comment
BRiT Posted August 6, 2011 Share Posted August 6, 2011 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 & Quote Link to comment
JM2005 Posted August 6, 2011 Share Posted August 6, 2011 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. Quote Link to comment
JM2005 Posted August 6, 2011 Share Posted August 6, 2011 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. Quote Link to comment
Stokkes Posted August 6, 2011 Author Share Posted August 6, 2011 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. Quote Link to comment
brent112 Posted August 6, 2011 Share Posted August 6, 2011 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" Quote Link to comment
BRiT Posted August 6, 2011 Share Posted August 6, 2011 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. Quote Link to comment
BRiT Posted August 6, 2011 Share Posted August 6, 2011 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 Quote Link to comment
Stokkes Posted August 6, 2011 Author Share Posted August 6, 2011 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 Quote Link to comment
JM2005 Posted August 6, 2011 Share Posted August 6, 2011 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 Quote Link to comment
SCSI Posted August 7, 2011 Share Posted August 7, 2011 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 Quote Link to comment
rvandaalen Posted August 7, 2011 Share Posted August 7, 2011 anyone else having trouble adding m4a AAC files? Quote Link to comment
brent112 Posted August 7, 2011 Share Posted August 7, 2011 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. Quote Link to comment
Stokkes Posted August 7, 2011 Author Share Posted August 7, 2011 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 Quote Link to comment
Benni-chan Posted August 7, 2011 Share Posted August 7, 2011 just installed v0.3. works great. thank you for your work! Quote Link to comment
spidi Posted August 7, 2011 Share Posted August 7, 2011 Thanks Sokkes, nice work! I took your package and build my one for SABnzbd from it. Thanks for Inspiration. good night, spidi Quote Link to comment
EddieA Posted August 7, 2011 Share Posted August 7, 2011 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. Quote Link to comment
Stokkes Posted August 8, 2011 Author Share Posted August 8, 2011 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". Quote Link to comment
JM2005 Posted August 8, 2011 Share Posted August 8, 2011 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 Quote Link to comment
SCSI Posted August 8, 2011 Share Posted August 8, 2011 Upgraded to .3 perfectly. Any advantages and disadvantages of running Plex other that root? Was that implemented for security reasons? Quote Link to comment
Stokkes Posted August 8, 2011 Author Share Posted August 8, 2011 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. Quote Link to comment
Stokkes Posted August 8, 2011 Author Share Posted August 8, 2011 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. Quote Link to comment
JM2005 Posted August 8, 2011 Share Posted August 8, 2011 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? Quote Link to comment
Stokkes Posted August 8, 2011 Author Share Posted August 8, 2011 Good thing you asked.. Dropbox is still "syncing".. wait about an hour (my upload is really slow). Quote Link to comment
JM2005 Posted August 8, 2011 Share Posted August 8, 2011 Good thing you asked.. Dropbox is still "syncing".. wait about an hour (my upload is really slow). Ok will do! Thanks Quote Link to comment
Recommended Posts
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.