I wanted to run the Flatpak version of Jellyfin server in headless mode and found that environment variables are not honored. To run in headless mode one is supposed to set $JELLYFIN_SERVICE_OPT to "--service".
This is unexpected for users who want to migrate from DEB/RPM to Flatpak. I want to suggest calling the binary with the same parameters as it is done in the upstream repository for Debian and Fedora. And also to not try to start a browser.
My suggestion would be to make the following changes:
I wanted to suggest using ! "${JELLYFIN_SERVICE_OPT}" =~ "--service" until I realized that the shebang is #!/bin/sh.
It should be possible for users to adapt the existing systemd service units with minor changes and have the flatpaked server run without manual intervention. When I tried, systemd said it received exit code 137.
I wanted to run the Flatpak version of Jellyfin server in headless mode and found that environment variables are not honored. To run in headless mode one is supposed to set
$JELLYFIN_SERVICE_OPT
to"--service"
.This is unexpected for users who want to migrate from DEB/RPM to Flatpak. I want to suggest calling the binary with the same parameters as it is done in the upstream repository for Debian and Fedora. And also to not try to start a browser.
My suggestion would be to make the following changes:
I wanted to suggest using
! "${JELLYFIN_SERVICE_OPT}" =~ "--service"
until I realized that the shebang is#!/bin/sh
.It should be possible for users to adapt the existing systemd service units with minor changes and have the flatpaked server run without manual intervention. When I tried, systemd said it received exit code 137.