Jellyfin Forum
disabled systemd service re-enabled after updates - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+--- Thread: disabled systemd service re-enabled after updates (/t-disabled-systemd-service-re-enabled-after-updates)



disabled systemd service re-enabled after updates - jimbothigpen - 2024-11-20

Is it expected behavior for jellyfin updates on Debian, using the https://repo.jellyfin.org/debian repo, to re-enable the systemd service if it's been disabled by the user? Other .deb packaged software seems to respect the state of systemd services as set by the user, but jellyfin updates always re-enable the service and try to start it up if it's stopped. Might not be a huge issue for many people, but I'm trying to run a sort of makeshift HA setup, with 3 LXCs using shared storage for jellyfin data, relying on keepalived to start the service on the proper host. If I don't first kill keepalived and ensure jellyfin is stopped on all 3 hosts, updates have a habit of corrupting the sqlite databases (when the service is re-enabled and started after an update on a system that is not supposed to be running jellyfin at the time).

If the behavior of updates -- re-enabling and starting the disabled service -- can't be changed to take into account the state of the service as set by the user, does anyone know of some sort of apt acrobatics that would prevent it?


RE: disabled systemd service re-enabled after updates - TheDreadPirate - 2024-11-20

I chatted with the team and the deb package is SUPPOSED to respect the current state of the service when upgrading. I am also interested in this since my main instance is in Docker, but I maintain an apt install for testing. As such, the service stays disabled and is only started for testing but both gets re-enabled and started after each upgrade.

I submitted a github ticket for jellyfin-packaging.

https://github.com/jellyfin/jellyfin-packaging/issues/50


RE: disabled systemd service re-enabled after updates - TheDreadPirate - 2024-11-21

Some additional parameters are being added to the apt package for future releases. The follow command will ensure that Jellyfin never starts without you actually starting it.

Code:
sudo systemctl mask jellyfin

And, in releases going forward, the Jellyfin apt package won't unmask the Jellyfin service during an upgrade. But if you do want to start Jellyfin you will need to unmask prior to starting.

If you want to stick with the "disabled" route, there will be a new option in /etc/default/jellyfin that you can uncomment to have the installer NOT start Jellyfin after it is done upgrading.

https://github.com/jellyfin/jellyfin-packaging/blob/36ba1e514753f5ee1ed47a52676fab03dbe8f270/debian/conf/jellyfin#L51

Again, this will be in future releases.