Plex request or similar

INCSlayer

Contributor
Joined
Apr 4, 2015
Messages
197
HAH got it working it seems the issue is that mono doesnt have any certificates stored by default which for some reason makes it crash
running the command
Code:
mozroots --import --ask-remove

imports certificates and then it runs just fine (i dont actually know what certificates it adds)
 

Schuby

Dabbler
Joined
Apr 27, 2016
Messages
37
HAH got it working it seems the issue is that mono doesnt have any certificates stored by default which for some reason makes it crash
running the command
Code:
mozroots --import --ask-remove

imports certificates and then it runs just fine (i dont actually know what certificates it adds)
Would you care to write up a step by step guide on how you got it working?
 

INCSlayer

Contributor
Joined
Apr 4, 2015
Messages
197
  1. pkg update && pkg upgrade
  2. pkg install wget mono screen
  3. echo 'jail_sysvipc_allow="YES"' >> /etc/rc.conf
  4. wget https://github.com/tidusjar/PlexRequests.Net/releases/download/v1.7.4/PlexRequests.zip
  5. unzip PlexRequests.zip
  6. mv Release /var/db/plex_requests
  7. mozroots --import --ask-remove
  8. touch /usr/local/bin/plex_requests
  9. now edit the /usr/local/bin/plex_requests file and put these lines into it:
    Code:
    #!/bin/sh
    cd /var/db/plex_requests
    /usr/local/bin/screen -d -m -S plex_requests /usr/local/bin/mono /var/db/plex_requests/PlexRequests.exe
  10. chmod 775 /usr/local/bin/plex_requests
  11. then i use cron to start it
  12. open cron with crontab -e and put these lines in it:
    Code:
    SHELL=/bin/sh
    PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin
    #start plexrequests
    @reboot /usr/local/bin/plex_requests
  13. restart jail
  14. use your browser and navigate to jail_ip:3579
i mostly just copied what was written earlier in the thread and added in what i use to get it running automatically so this is kinda"dirty" but its the best i can do and it should work but i take no responsibility if it doesnt
 
Last edited:

Schuby

Dabbler
Joined
Apr 27, 2016
Messages
37
  1. pkg update && pkg upgrade
  2. pkg install wget mono screen
  3. echo 'jail_sysvipc_allow="YES"' >> /etc/rc.conf
  4. wget https://github.com/tidusjar/PlexRequests.Net/releases/download/v1.6.1/PlexRequests.zip
  5. unzip PlexRequests.zip
  6. mv Release /var/db/plex_requests
  7. mozroots --import --ask-remove
  8. touch /usr/local/bin/plex_requests
  9. echo "#!/bin/sh" >> /usr/local/bin/plex_requests
  10. echo "cd /var/db/plex_requests" >> /usr/local/bin/plex_requests
  11. echo "/usr/local/bin/screen -d -m -S root nohup /usr/local/bin/mono /var/db/plex_requests/PlexRequests.exe" >> /usr/local/bin/plex_requests
  12. chmod 775 /usr/local/bin/plex_requests
  13. then i use cron to start it
  14. open cron with crontab -e and put these lines in it:
    SHELL=/bin/sh
    PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin
    #start plexrequests
    @Reboot /usr/local/bin/plex_requests
  15. restart jail
  16. use your browser and navigate to jail_ip:3579
i mostly just copied what was written earlier in the thread and added in what i use to get it running automatically so this is kinda"dirty" but its the best i can do and it should work but i take no responsibility if it doesnt

Thanks I'll give it a shot tomorrow!
 

Schuby

Dabbler
Joined
Apr 27, 2016
Messages
37
  1. pkg update && pkg upgrade
  2. pkg install wget mono screen
  3. echo 'jail_sysvipc_allow="YES"' >> /etc/rc.conf
  4. wget https://github.com/tidusjar/PlexRequests.Net/releases/download/v1.6.1/PlexRequests.zip
  5. unzip PlexRequests.zip
  6. mv Release /var/db/plex_requests
  7. mozroots --import --ask-remove
  8. touch /usr/local/bin/plex_requests
  9. echo "#!/bin/sh" >> /usr/local/bin/plex_requests
  10. echo "cd /var/db/plex_requests" >> /usr/local/bin/plex_requests
  11. echo "/usr/local/bin/screen -d -m -S root nohup /usr/local/bin/mono /var/db/plex_requests/PlexRequests.exe" >> /usr/local/bin/plex_requests
  12. chmod 775 /usr/local/bin/plex_requests
  13. then i use cron to start it
  14. open cron with crontab -e and put these lines in it:
    SHELL=/bin/sh
    PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin
    #start plexrequests
    @Reboot /usr/local/bin/plex_requests
  15. restart jail
  16. use your browser and navigate to jail_ip:3579
i mostly just copied what was written earlier in the thread and added in what i use to get it running automatically so this is kinda"dirty" but its the best i can do and it should work but i take no responsibility if it doesnt

Did you ever run into this error?

Code:
root@plexrequest:/ # mozroots --import --ask-remove                                                                              
Mozilla Roots Importer - version 4.2.3.0                                                                                         
Download and import trusted root certificates from Mozilla's MXR.                                                                
Copyright 2002, 2003 Motus Technologies. Copyright 2004-2008 Novell. BSD licensed.                                               
                                                                                                                                 
Downloading from 'http://mxr.mozilla.org/seamonkey/source/security/nss/lib/ckfw/builtins/certdata.txt?raw=1'...                  
Couldn't retrieve the file using the supplied information.   


Did some research and couldn't find a resolution yet.

Edit: Looks like my jail can't DNS resolve mozilla.org. I'll need to fix that before continuing.

Edit 2: Ok so I'm not sure why my FreeNAS cannot resolve mozilla.org, but I went ahead and downloaded the cert file and fed it to mozroots manually and it worked fine. The only issues I had with your instructions are:

  1. "echo "#!/bin/sh" >> /usr/local/bin/plex_requests" didn't work, so I made the file and added the data from the next three lines manually.
  2. Crontab didn't work. It errored out indicating it is missing a timing qualifier.
Other than that, it works. Thanks!
 
Last edited:

INCSlayer

Contributor
Joined
Apr 4, 2015
Messages
197
the forum is being dumb and capitalizing the R in reboot because it assumes that the @ means its a username so if you used a capital R that is probably the reason i rewrote it abit and used code tags
 

Schuby

Dabbler
Joined
Apr 27, 2016
Messages
37
the forum is being dumb and capitalizing the R in reboot because it assumes that the @ means its a username so if you used a capital R that is probably the reason i rewrote it abit and used code tags

Thanks I'll give it a shot!

Edit: Up and running, thank you!
 
Last edited:

Johannez

Explorer
Joined
Jan 25, 2016
Messages
59
INCSlayer thank you very much for your guide how to install Plex Requests.

Can you tell me how to update Plex Requests, git pull in the install directory does not work.
 

INCSlayer

Contributor
Joined
Apr 4, 2015
Messages
197
i usually just shut it down then i download whatever the latest version is (at the time of writing this its 1.9.0)
so assuming you followed my steps earlier
first we shut plex requests off:
Code:
screen -r plex_requests
CTRL+A
:quit


then we download the new version:
Code:
wget https://github.com/tidusjar/PlexRequests.Net/releases/download/v1.9.0/PlexRequests.zip
unzip PlexRequests.zip
#if you have already updated before and therefore already have a plex_requests_bak already first do: rm -rf /var/db/plex_requests_bak before continuing
mv /var/db/plex_requests /var/db/plex_requests_bak
mv Release /var/db/plex_requests
cp /var/db/plex_requests_bak/PlexRequests.sqlite /var/db/plex_requests/PlexRequests.sqlite

then restart the jail and your new version will start with your pre-existing database in place.

Im sure there is a better way todo this but this works and im too lazy to improve it atm
 

Johannez

Explorer
Joined
Jan 25, 2016
Messages
59
Thank you INCSlayer. It all works perfect ;)
 

ZodiacUHD

Patron
Joined
Aug 28, 2015
Messages
226
  1. pkg update && pkg upgrade
  2. pkg install wget mono screen
  3. echo 'jail_sysvipc_allow="YES"' >> /etc/rc.conf
  4. wget https://github.com/tidusjar/PlexRequests.Net/releases/download/v1.7.4/PlexRequests.zip
  5. unzip PlexRequests.zip
  6. mv Release /var/db/plex_requests
  7. mozroots --import --ask-remove
  8. touch /usr/local/bin/plex_requests
  9. now edit the /usr/local/bin/plex_requests file and put these lines into it:
    Code:
    #!/bin/sh
    cd /var/db/plex_requests
    /usr/local/bin/screen -d -m -S plex_requests /usr/local/bin/mono /var/db/plex_requests/PlexRequests.exe
  10. chmod 775 /usr/local/bin/plex_requests
  11. then i use cron to start it
  12. open cron with crontab -e and put these lines in it:
    Code:
    SHELL=/bin/sh
    PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin
    #start plexrequests
    @reboot /usr/local/bin/plex_requests
  13. restart jail
  14. use your browser and navigate to jail_ip:3579
i mostly just copied what was written earlier in the thread and added in what i use to get it running automatically so this is kinda"dirty" but its the best i can do and it should work but i take no responsibility if it doesnt


I tried following the guide but even tho i restart the jail, plexrequests doesen't start... Maybe i'm doing something wrong? i edit the plex_requests file using ee, maybe i should use something else?
 

INCSlayer

Contributor
Joined
Apr 4, 2015
Messages
197
I tried following the guide but even tho i restart the jail, plexrequests doesen't start... Maybe i'm doing something wrong? i edit the plex_requests file using ee, maybe i should use something else?

if you go to /var/db/plex_requests
and then use the command:
/usr/local/bin/mono /var/db/plex_requests/PlexRequests.exe

what is the message you receive? please use code tags when posting it
 

ZodiacUHD

Patron
Joined
Aug 28, 2015
Messages
226
if you go to /var/db/plex_requests
and then use the command:
/usr/local/bin/mono /var/db/plex_requests/PlexRequests.exe

what is the message you receive? please use code tags when posting it
Code:
root@plexrequests_1:/ # cd /var/db/plex_requests                               
root@plexrequests_1:/var/db/plex_requests # /usr/local/bin/mono /var/db/plex_req
uests/PlexRequests.exe                                                         
Starting Up! Please wait, this can usually take a few seconds.                 
Version: 1.9.1                                                                 
Location of the database: /var/db/plex_requests/PlexRequests.sqlite             
Your operating system's sysconf (3) function doesn't correctly report physical m
emory size!                                                                     
no configuration section <common/logging> found - suppressing logging output   
Plex Requests is running on the following: http://+:3579/                       
All setup, Plex Requests is now ready!
 

INCSlayer

Contributor
Joined
Apr 4, 2015
Messages
197
ok so if you start it manually it works fine but it wont autostart for you?

if you start it in a screen not detaced ie:
/usr/local/bin/screen -S plex_requests /usr/local/bin/mono /var/db/plex_requests/PlexRequests.exe

does it still work?
 

ZodiacUHD

Patron
Joined
Aug 28, 2015
Messages
226
ok so if you start it manually it works fine but it wont autostart for you?

if you start it in a screen not detaced ie:
/usr/local/bin/screen -S plex_requests /usr/local/bin/mono /var/db/plex_requests/PlexRequests.exe

does it still work?

Ok i feel super dumb, thank you for your patience but the only thing that wasn't working, was my brain. I made a typo and went for
Code:
HELL=/bin/sh
PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin
#start plexrequests
@reboot /usr/local/bin/plex_requests
instead of
Code:
SHELL=/bin/sh
PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin
#start plexrequests
@reboot /usr/local/bin/plex_requests


Sorry again, i even double checked it before posting my "issue". Thank you very much anyway for taking the time.
 

INCSlayer

Contributor
Joined
Apr 4, 2015
Messages
197
no problem just happy you solved it
 

tstorm

Explorer
Joined
Jan 5, 2015
Messages
69
Thanks INCSlayer, I got this up and running following your steps. Now I'm trying to figure out how to point this to the internet. I have DDNS and a pfsense box, I'm thinking reverse proxy but not really sure. Any idea?
 

INCSlayer

Contributor
Joined
Apr 4, 2015
Messages
197
i mean the very easiest way would simply be to port forward it. i do a reverse proxy using my main nginx jail you probably want to change the base Url for plex_requests in that case to have a path you can proxy too incase your reverse proxying multiple things
 

tstorm

Explorer
Joined
Jan 5, 2015
Messages
69
I tried to port forward and it kept connecting to plex regardless of port number used. So you're saying if I put "plexrequests" as base url I would then access "DDNSAddress.com/plexrequests"? I'm a little confused on how all of this works.
 
Top