yavdr-ansible/roles/kodi/templates/kodi.service.j2
2018-08-10 16:03:57 +02:00

13 lines
394 B
Django/Jinja

[Unit]
Description=Start kodi in user session
[Service]
Type=simple
PassEnvironment=DISPLAY XDG_RUNTIME_DIR DBUS_SESSION_BUS_ADDRESS
ExecStartPre=-/usr/bin/set-kodi-display
ExecStart=/usr/bin/kodi -l /run/lirc/lircd
ExecStop=/bin/bash -c "/usr/bin/kodi-send --action=QUIT; while ps -p $MAINPID -o comm=; do sleep .25; done"
TimeoutStopSec=10
SuccessExitStatus=0 127 SIGKILL
Restart=on-failure