Automating PMS on boot

Hi All,

Manually downloaded PMS has a start.sh script - works well. How do I automate it to run on boot? Tried using an rc.d script from the pkg - nope. Tried renaming start.sh and placing in relevant directories - nope. Probably a basic question but could not find any info online… :slight_smile:

Thanks!

If this in on a FreeBSD box and not some derivative, (i.e.: FreeNAS, XigmaNAS, etc.) you would need to edit /etc/rc.conf or /usr/local/etc/rc.conf as root and add the line:

plexmediaserver_enable="YES"

This will start Plex at boot time…

Hi! Nope, that don’t work if the install manual. I’ve left it since package removal and it did nothing. It probably needs plexmediaserver_enable defined somewhere… where? What does the package do in order for that flag to run PMS? Or do I need to manually add a rc.d script?

The system’s FreeBSD 12.1.

I use portmaster to install programs on my FreeBSD system… It installs everything you need in the right places, including the rc.d script… After that you edit one of the two files like I mentioned above…

Never tried to install Plex manually when it’s so easy to do it from the ports system…

The rc.d that comes with the port should work fine to start it provided things are in the correct place.

If you want to upgrade “manually” u need to create a port from the tarball u get via plex.tv (that’s not a ready to install package for freebsd pkgng).

I posted a script somewhere here in forums that downloads the tarball to /usr/ports/distfiles and then updated the Makefile and “builds” the ready to install txz.

Can’t find it quickly (on mobile) I’ll post it when I do.

Even so and in theory, if you unpacked to the correct place it should work with the previous rc.d, but you’ll make a mess for pkgng as the files it installed are no longer the same.

If you removed it then the rc.d script is gone unless u keep a backup btw. pkg removewipes all that was previously installed by “it”.

Script was posted here: PKG update/upgrade dosen't work...How do I update using ports?

Yes, I copied the script out before removing the package. :slight_smile: Then restored it and nothing happened. I’ll have a look at your script. It looks familiar by now. :smiley:

you can do something like sh -x /usr/local/etc/rc.d/plexmediaserver and maybe find more about what might be wrong.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.