Would it be possible to package the deb (and possible also rpm) so that one of the following two options happen:
use /etc/defaults/plexmediaserver to allow configuration of parameter like “PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR”
do not overwrite “/etc/systemd/system/multi-user.target.wants/plexmediaserver.service” on every update which allows for changing “PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR”
That either of the above are not in place, ruins auto update.
No everyone wants to have their library in “/var/lib/plexmediaserver/Library/…”
I did my first systemd override file yesterday after moving my library; wasn’t particularly difficult.
I’ve run Debian for a buncha years and a .deb package should respect an existing configuration in /etc. Either the .deb package is configured incorrectly or someone packaged it that way on purpose
Not much, it just shouldn’t overwrite an existing configuration in /etc unless the sysadmin explicitly tells dpkg to do that. /etc belongs to the sysadmin and by default dpkg won’t overwrite an existing configuration unless you use a ‘force-confmiss’ switch.
If apt is overwriting files in /etc it’s because something in the package told it to
There are files which belong to core PMS. If I’m accidentally overwriting files I shouldn’t be, I can easily correct that.
I thought I had everything correct with which files are owned by the package manager because I had to re-write all of it for systemd and bash (the SELinux change update).
Under systemd, /lib/systemd/system, everything is under system control, with exception to override files (e.g. /etc/systemd/system/plexmediaserver.service.d/override.conf) which is your customization of the default. I leave that sacred. I do overwrite /lib/systemd/system/plexmediaserver.service because it’s under package manager control.
If you can help me sort it out, I’ll gladly implement the change provided it’s not a 1-off thing
Hi, Chuck - I didn’t realize I was talking to the packager
The purpose of /etc/systemd/system is to override defaults in /lib/systemd/system. An override file shouldn’t be necessary because /etc/systemd/system/plexmediaserver.service is an override file.
The proper way to override a systemd .service file is to copy the file from /lib/systemd/system to /etc/systemd/system and make your edits there. The only time you would need a separate override file is if you wanted to override what’s in /etc, which belongs to the sysadmin anyway either way will work to override what’s in /lib but if someone has manually overridden the service we probably shouldn’t be overwriting it
the plexmediaserver.service in /etc/systemd/system is superflous if it mirrors what’s in /lib/systemd -
I was using the override process until about five minutes ago - then I renamed the override.conf, fixed /etc/systemd/system/plexmediaserver.service to store its database in my home directory, changed the location of the temp directory and the user under which Plex runs. Worked just fine
Actually, you’re in error because there are two types of overrides and your method cuts you off from any corrective actions I may need to take at the system level
You may override the service by using `/etc/systemd/system/plexmediaserver.service.d/override.conf
You may completely override the entire unit forever by creating /etc/systemd/system/plexmediaserver.service
I chose to implement the service override. It gives you the freedom to customize variables you need for your local conditions while still affording me the the ability to adapt to system-level issues . Doing it this way affords you the same freedom as /etc/default/plexmediaserver on init systems.
Edit: Some of the vendors ‘tweak’ systemd to their liking. Because the packaging must work everywhere, I utilize the systemd standard specifications. Since I’ve implemented it 2 years ago, there have been no ill side-effects
Believe me, I appreciate everything you guys do and I really don’t feel the need to debate - I would prefer the package respected changes I make in /etc, that’s all.
As far as changes in /lib - if I can’t read a changelog and my override breaks the system that’s my fault and I get to fix the thing or at least keep the pieces
Running Debian Unstable here - I did have some GPG weirdness with apt and plex repos for awhile that seems to have resolved now. Other than that each installation has been pretty much flawless.