Resource icon

Scripted Plex installation

MauricioU

Explorer
Joined
May 22, 2017
Messages
64
*EDIT----------
I took a crack at question 2 and seemed to have figured it out. Only outstanding question is it seems like the script did NOT set up a cron job for updating plex—at least as reflected in the WebGUI under tasks. Is there a way to check this?

--------------------------------------

Hi all,

I have 2 questions I am hoping someone can help with.

1. When I run Danb's script for installing plex, it seems like it is working, but I am not seeing the additional cron job that updates the plex server added in my tasks? Is this normal?

2. I am following these instructions to upgrade one of my jails just to try it:
In a nutshell, yes. The steps, from memory, are:

- Upgrade to TrueNAS 12.0-U5 or later
- On SSH session to TrueNAS, iocage fetch and grab 12.2-RELEASE
- iocage list -l and then iocage upgrade -r 12.2-RELEASE jailname for one of the base jails, and every clone jail
- For each jail: iocage console jailname then pkg-static install -f -y pkg and then pkg upgrade -y

And that should do it. All jails upgraded to 12.2 and in line with TrueNAS Core 12.0, which runs FreeBSD 12.2.

I am running into this problem:

Code:
Attempting to automatically merge changes in files... done.

The following file could not be merged automatically: /etc/mail/mailer.conf
Press Enter to edit this file in /usr/bin/vi and resolve the conflicts
manually...
<<<<<<< current version
# $FreeBSD: releng/12.3/etc/mail/mailer.conf 363973 2020-08-06 18:13:45Z kevans $
#
# Execute the "real" sendmail program, named /usr/libexec/sendmail/sendmail
#
#sendmail       /usr/libexec/sendmail/sendmail
#mailq          /usr/libexec/sendmail/sendmail
#newaliases     /usr/libexec/sendmail/sendmail
#hoststat       /usr/libexec/sendmail/sendmail
#purgestat      /usr/libexec/sendmail/sendmail

#
# Execute the Postfix sendmail program, named /usr/local/sbin/sendmail
#
sendmail        /usr/local/sbin/sendmail
send-mail       /usr/local/sbin/sendmail
mailq           /usr/local/sbin/sendmail
newaliases      /usr/local/sbin/sendmail
=======
# $FreeBSD$
#
# Execute the "real" sendmail program, named /usr/libexec/sendmail/sendmail
#
# If dma(8) is installed, an example mailer.conf that uses dma(8) instead can
# can be found in /usr/share/examples/dma.
#
sendmail        /usr/libexec/sendmail/sendmail
mailq           /usr/libexec/sendmail/sendmail
newaliases      /usr/libexec/sendmail/sendmail
purgestat       /usr/libexec/sendmail/sendmail
>>>>>>> 13.2-RELEASE
~



I have no idea what to modify to "Resolve the conflicts". Some preliminary research, without going down the rabbit hole, has led me to understand everything between <<< and === is the current version and everything after === and before >>> is the new version of the file that is unable to merge. Should I delete everything that is the "current version"? Not a super important jail I'm trying this on, but thought I'd ask here first. Looking forward to the help!
 
Last edited:

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
it seems like the script did NOT set up a cron job for updating plex—at least as reflected in the WebGUI under tasks. Is there a way to check this?
I don't think that's what the script would be expected to do.

Any cron task set up by the script would be in the jail, not on the host.
 

MauricioU

Explorer
Joined
May 22, 2017
Messages
64
I don't think that's what the script would be expected to do.

Any cron task set up by the script would be in the jail, not on the host.
So in the description of the github page for the script:

It will create a jail, install Plex Media Server (with or without PlexPass), configure Plex to store its preferences and metadata outside the jail, and create a cron job to update the installed packages every week using the FreeBSD latest repository rather than quarterly.

What you said about the cron job being set up IN the jail rather than outside, that makes perfect sense. Is there a way to verify this? I am seeing this on plex still—granted its only been 2 days since running the script:

1691518230441.png


Would love to be able to verify the cron job was created and maybe manually run it to check if its working
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
What you said about the cron job being set up IN the jail rather than outside, that makes perfect sense. Is there a way to verify this?
From inside the jail, run crontab -l. It's entirely normal for Plex on FreeBSD to be a few days or more behind.
 

MauricioU

Explorer
Joined
May 22, 2017
Messages
64
From inside the jail, run crontab -l. It's entirely normal for Plex on FreeBSD to be a few days or more behind.
Thank YOU!!!
 

jweldon

Dabbler
Joined
Apr 17, 2022
Messages
19
Ok trying this here. Followed the instructions on the site. got the git clone done. Created the config file. How do i get the config file on the freenas?
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Lots of options here, but I'd expected you'd use an editor on the NAS itself (like ee or nano, or vi if you're a masochist) to create the config file there. But other than that, a number of other options come to mind:
  • Copy the config file over the network to a shared directory, then on the NAS to wherever the script is
  • Use scp (via the command-line or a third-party application like WinSCP) to copy the config file to wherever you want it to be on the NAS
  • Use an editor that supports editing remote files (e.g., Notepad++, VSCode, BBEdit) to create/edit the file on the NAS.
No doubt there are other possibilities.
 

jweldon

Dabbler
Joined
Apr 17, 2022
Messages
19
yeah i thought about doing vi I guess i will just do that. Assuming place the file in the same iocage directory?
 

jweldon

Dabbler
Joined
Apr 17, 2022
Messages
19
Ok so I am overlooking something then. I try to run the ./plex-jail.sh and it tells me no such file
 

jweldon

Dabbler
Joined
Apr 17, 2022
Messages
19
Ok i got the ./plex-jail.sh to run. It starts and kills the connection of the freenas box and my connection. Should i change the IP of the jail? Does not look like it is finishing the install because it dies right as it starts bootstrapping from the pkg.freebsd site.
 

jweldon

Dabbler
Joined
Apr 17, 2022
Messages
19
Update. So pms is installed as a jail. So now shouldn't i be able to access plex admin page? If so not coming up.
 

jweldon

Dabbler
Joined
Apr 17, 2022
Messages
19
pms is running. Nameserver and DNS are set. Actually just using gateway for both.

JAIL_IP="192.168.2.243"
DEFAULT_GW_IP="192.168.2.1"
POOL_PATH="/mnt/Vol2"
PLEX_MEDIA_PATH="/mnt/Vol2/Media"
 
Top