1 |
commit: 8085f241c486d2e44a04f6e6f65b778a86325b21 |
2 |
Author: James Le Cuirot <chewi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Sep 2 11:19:36 2018 +0000 |
4 |
Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Sep 2 11:43:08 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8085f241 |
7 |
|
8 |
media-tv/tvheadend: Fix systemd service unit |
9 |
|
10 |
I haven't tested this as I don't use systemd. |
11 |
|
12 |
Closes: https://bugs.gentoo.org/654346 |
13 |
Package-Manager: Portage-2.3.48, Repoman-2.3.10 |
14 |
|
15 |
media-tv/tvheadend/files/tvheadend.service | 15 +++++++++------ |
16 |
1 file changed, 9 insertions(+), 6 deletions(-) |
17 |
|
18 |
diff --git a/media-tv/tvheadend/files/tvheadend.service b/media-tv/tvheadend/files/tvheadend.service |
19 |
index 2d0573ca910..6d1e27445b7 100644 |
20 |
--- a/media-tv/tvheadend/files/tvheadend.service |
21 |
+++ b/media-tv/tvheadend/files/tvheadend.service |
22 |
@@ -3,19 +3,22 @@ Description=tvheadend |
23 |
After=network.target |
24 |
|
25 |
[Service] |
26 |
-Type=forking |
27 |
+Type=simple |
28 |
User=tvheadend |
29 |
Group=video |
30 |
RuntimeDirectory=tvheadend |
31 |
PIDFile=/run/tvheadend/tvheadend.pid |
32 |
-ExecStart=/usr/bin/tvheadend -6 -f -p /run/tvheadend.pid -C -c /etc/tvheadend |
33 |
+EnvironmentFile=/etc/conf.d/tvheadend |
34 |
+ExecStart=/usr/bin/tvheadend -p /run/tvheadend/tvheadend.pid -c "${TVHEADEND_CONFIG}" ${TVHEADEND_OPTIONS} |
35 |
+TimeoutStartSec=1m |
36 |
+TimeoutStopSec=20s |
37 |
Restart=always |
38 |
-RestartSec=5 |
39 |
+RestartSec=5s |
40 |
DevicePolicy=closed |
41 |
-DeviceAllow=char-DVB rw # DVB devices |
42 |
-DeviceAllow=char-drm rw # GPUs for transcoding |
43 |
+DeviceAllow=char-DVB rw |
44 |
+DeviceAllow=char-drm rw |
45 |
RestrictAddressFamilies=AF_INET AF_INET6 |
46 |
-ProtectSystem=strict |
47 |
+ProtectSystem=yes |
48 |
ProtectHome=yes |
49 |
NoNewPrivileges=yes |