mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 19:37:55 +02:00
Reportedly `systemd-run --scope` still got killed by the service manager; see #4615. The suspected cause is that `scope` units are run by the `systemd-run` process itself and inherit the caller's execution environment (see systemd-run(1)). To fix this, we use a systemd `service` unit instead, which is run and managed by PID 1 - hopefully this will isolate us sufficiently so that we don't get terminated along with `jellyfin.service`.
18 lines
722 B
Text
18 lines
722 B
Text
# Allow jellyfin group to start, stop and restart itself
|
|
Cmnd_Alias RESTARTSERVER_SYSTEMD = /usr/bin/systemd-run systemctl restart jellyfin
|
|
Cmnd_Alias STARTSERVER_SYSTEMD = /usr/bin/systemd-run systemctl start jellyfin
|
|
Cmnd_Alias STOPSERVER_SYSTEMD = /usr/bin/systemd-run systemctl stop jellyfin
|
|
|
|
jellyfin ALL=(ALL) NOPASSWD: RESTARTSERVER_SYSTEMD
|
|
jellyfin ALL=(ALL) NOPASSWD: STARTSERVER_SYSTEMD
|
|
jellyfin ALL=(ALL) NOPASSWD: STOPSERVER_SYSTEMD
|
|
|
|
Defaults!RESTARTSERVER_SYSTEMD !requiretty
|
|
Defaults!STARTSERVER_SYSTEMD !requiretty
|
|
Defaults!STOPSERVER_SYSTEMD !requiretty
|
|
|
|
# Allow the server to mount iso images
|
|
jellyfin ALL=(ALL) NOPASSWD: /bin/mount
|
|
jellyfin ALL=(ALL) NOPASSWD: /bin/umount
|
|
|
|
Defaults:jellyfin !requiretty
|