summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Le Cuirot <chewi@gentoo.org>2018-09-02 12:19:36 +0100
committerJames Le Cuirot <chewi@gentoo.org>2018-09-02 12:43:08 +0100
commit8085f241c486d2e44a04f6e6f65b778a86325b21 (patch)
tree50435549b3a868d35d5a62c496098bea6f6a5e2a /media-tv/tvheadend
parentmedia-tv/tvheadend: Change init script to non-fatal "use net" (diff)
downloadgentoo-8085f241c486d2e44a04f6e6f65b778a86325b21.tar.gz
gentoo-8085f241c486d2e44a04f6e6f65b778a86325b21.tar.bz2
gentoo-8085f241c486d2e44a04f6e6f65b778a86325b21.zip
media-tv/tvheadend: Fix systemd service unit
I haven't tested this as I don't use systemd. Closes: https://bugs.gentoo.org/654346 Package-Manager: Portage-2.3.48, Repoman-2.3.10
Diffstat (limited to 'media-tv/tvheadend')
-rw-r--r--media-tv/tvheadend/files/tvheadend.service15
1 files changed, 9 insertions, 6 deletions
diff --git a/media-tv/tvheadend/files/tvheadend.service b/media-tv/tvheadend/files/tvheadend.service
index 2d0573ca910f..6d1e27445b73 100644
--- a/media-tv/tvheadend/files/tvheadend.service
+++ b/media-tv/tvheadend/files/tvheadend.service
@@ -3,19 +3,22 @@ Description=tvheadend
After=network.target
[Service]
-Type=forking
+Type=simple
User=tvheadend
Group=video
RuntimeDirectory=tvheadend
PIDFile=/run/tvheadend/tvheadend.pid
-ExecStart=/usr/bin/tvheadend -6 -f -p /run/tvheadend.pid -C -c /etc/tvheadend
+EnvironmentFile=/etc/conf.d/tvheadend
+ExecStart=/usr/bin/tvheadend -p /run/tvheadend/tvheadend.pid -c "${TVHEADEND_CONFIG}" ${TVHEADEND_OPTIONS}
+TimeoutStartSec=1m
+TimeoutStopSec=20s
Restart=always
-RestartSec=5
+RestartSec=5s
DevicePolicy=closed
-DeviceAllow=char-DVB rw # DVB devices
-DeviceAllow=char-drm rw # GPUs for transcoding
+DeviceAllow=char-DVB rw
+DeviceAllow=char-drm rw
RestrictAddressFamilies=AF_INET AF_INET6
-ProtectSystem=strict
+ProtectSystem=yes
ProtectHome=yes
NoNewPrivileges=yes