Do note that on FreeNAS specifically that first one might be “/” or you need to adapt to -plexpass in any case all the others should be the same (well PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS could also be changed I suppose.
This also assumes its called inside the install dir.
Its actually HOME that’s doing the same not the other, sorry I should have clarified!
You can even set both but PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR should default to “HOME”; also “HOME” might be needed elsewhere but probably on PMS and not the scanner (unsure) either way for you’re use case if that one works and you don’t need HOME than I suppose that’s fine!
I just wanted to leave here a fill start.sh that should work to start any of the binaries (just like the rc.d script does)
I just noticed this. It behaves differently when HOME is set to different values. But it doesn’t WORK until PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR is set correctly.
From your script - no error, no output, doesn’t work, just returns to prompt:
[plex@plex /usr/local/share/plexmediaserver]$ echo $HOME
/usr/local/plexdata//Plex Media Server
[plex@plex /usr/local/share/plexmediaserver]$
oh I just noticed you’re setting those in the shell it self, there could be another env vars messing with it I suppose, that’s likely it, but again if that works for you every time than stick with it, but I would add “HOME” too just in case.
Oh! I’ve certainly got nothing against the script, or against using all of the useful/necessary environment variables. I was trying to give a minimized example, to show that I need PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR too. Maybe I added to the confusion.
Non-minimized example, including env output for verification.
root@plex:/usr/local/share # su - plex
$ cd /usr/local/share/PlexMediaServer-1.19.4.2935-79e214ead/
$ ./start-new.sh
### env now:
PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS=6
LANG=en_US.UTF-8
MAIL=/var/mail/plex
PATH=/usr/local/share/PlexMediaServer-1.19.4.2935-79e214ead/Resources/Python/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/tmp/bin
LD_LIBRARY_PATH=/usr/local/share/PlexMediaServer-1.19.4.2935-79e214ead/lib
PLEX_MEDIA_SERVER_LOG_DIR=/usr/local/plexdata//Plex Media Server/Logs
OLDPWD=/tmp
PWD=/usr/local/share/PlexMediaServer-1.19.4.2935-79e214ead
TERM=xterm-256color
PLEX_MEDIA_SERVER_HOME=/usr/local/share/PlexMediaServer-1.19.4.2935-79e214ead
HOME=/usr/local/plexdata//Plex Media Server
USER=plex
PYTHONHOME=/usr/local/share/PlexMediaServer-1.19.4.2935-79e214ead/Resources/Python
SUPPORT_PATH=/usr/local/plexdata/
SHELL=/bin/sh
LC_ALL=en_US.UTF-8
plexmediaserver_support_path=/usr/local/plexdata/
BLOCKSIZE=K
### Trying to start Plex Media Scanner ...
### Command: `./Plex\ Media\ Scanner -i -o47923`
### ... done.
########################
### Setting PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR ...
### env now:
PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS=6
LANG=en_US.UTF-8
MAIL=/var/mail/plex
PATH=/usr/local/share/PlexMediaServer-1.19.4.2935-79e214ead/Resources/Python/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/tmp/bin
LD_LIBRARY_PATH=/usr/local/share/PlexMediaServer-1.19.4.2935-79e214ead/lib
PLEX_MEDIA_SERVER_LOG_DIR=/usr/local/plexdata//Plex Media Server/Logs
OLDPWD=/tmp
PWD=/usr/local/share/PlexMediaServer-1.19.4.2935-79e214ead
TERM=xterm-256color
PLEX_MEDIA_SERVER_HOME=/usr/local/share/PlexMediaServer-1.19.4.2935-79e214ead
HOME=/usr/local/plexdata//Plex Media Server
USER=plex
PYTHONHOME=/usr/local/share/PlexMediaServer-1.19.4.2935-79e214ead/Resources/Python
SUPPORT_PATH=/usr/local/plexdata/
PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/usr/local/plexdata/
SHELL=/bin/sh
LC_ALL=en_US.UTF-8
plexmediaserver_support_path=/usr/local/plexdata/
BLOCKSIZE=K
### Trying to start Plex Media Scanner:
### Command: `./Plex\ Media\ Scanner -i -o47923`
Title: Airplane!
Part: /mnt/jailshare/movies.radarr/Airplane! (1980)/Airplane! (1980) Bluray-1080p.mp4
###... done.
I’m curious if @habys is still around and could try with just $HOME or with your script or mine. I can’t imagine how my environment is causing this, but that might be a failure of imagination.
It’s a FreeNAS 11.3-Stable system, but I’m not using the FreeNAS plugin. I’ve got a default jail and the FreeBSD version of Plex. 1.19.5.2916 and 1.19.4.2935 behave the same way.
Comparing against a Plex Media Scanner process that was launched by Plex itself, I think we were missing PLEX_MEDIA_SERVER_LOG_DIR but I don’t think that was our issue. I added it and it didn’t make a difference. That certainly does include PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR; it’s where I learned about it.
I don’t think EAE_ROOT and LIBVA_DRIVERS_PATH and FFMPEG_EXTERNAL_LIBS are needed except by the Transcoder and EAE processes.
Yeah all the extra stuff is for the transcoder, and the logs dir is optional too (It will also default to user $HOME/Logs, but you could use it to change the logs dir if you wanted.
In case it was something “clever” that I was doing, I created a brand-new FreeNAS Plex plugin instance. Copied start-new.sh over, changed plexmediaserver_support_path to /.
Abort trap if PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR isn’t set.