systemd/tvwall-drm.service.in
38 Zeilen · 1.1 KB · Text
| 1 | # TV-Wall - Wiedergabe direkt auf der Konsole (Raspberry Pi OS Lite). |
| 2 | # Wird von install.sh nach /etc/systemd/system/tvwall.service geschrieben. |
| 3 | [Unit] |
| 4 | Description=TV-Wall Media-Player und Webinterface |
| 5 | Documentation=file:/opt/tvwall/README.md |
| 6 | After=network.target getty@tty1.service |
| 7 | Conflicts=getty@tty1.service |
| 8 | |
| 9 | [Service] |
| 10 | Type=simple |
| 11 | User=@RUN_USER@ |
| 12 | SupplementaryGroups=video render audio input tty |
| 13 | |
| 14 | # Bildschirm gehoert uns: Konsole tty1, kein Bildschirmschoner, kein Cursor. |
| 15 | TTYPath=/dev/tty1 |
| 16 | StandardInput=tty-force |
| 17 | StandardOutput=journal |
| 18 | StandardError=journal |
| 19 | TTYVTDisallocate=yes |
| 20 | ExecStartPre=/bin/sh -c '/usr/bin/setterm --blank 0 --powerdown 0 --cursor off > /dev/tty1 || true' |
| 21 | |
| 22 | ExecStart=/usr/local/bin/tvwall -config @CONFIG@ |
| 23 | Restart=always |
| 24 | RestartSec=3 |
| 25 | |
| 26 | # Damit der Webserver Port 80 verwenden darf, ohne als root zu laufen. |
| 27 | AmbientCapabilities=CAP_NET_BIND_SERVICE |
| 28 | CapabilityBoundingSet=CAP_NET_BIND_SERVICE |
| 29 | |
| 30 | # /run/tvwall fuer den mpv-Steuersocket |
| 31 | RuntimeDirectory=tvwall |
| 32 | RuntimeDirectoryMode=0775 |
| 33 | |
| 34 | NoNewPrivileges=yes |
| 35 | ProtectSystem=full |
| 36 | |
| 37 | [Install] |
| 38 | WantedBy=multi-user.target |