Commit 26b31185 authored by nimrod's avatar nimrod
Browse files

Kodi service.

Use the one from https://github.com/xbmc/xbmc/pull/14905 but with slight
tweaks. Keyboard input still isn't working, but it starts up reliably.
parent 1907f7a3
Loading
Loading
Loading
Loading

roles/kodi/files/kodi.service

deleted100644 → 0
+0 −14
Original line number Diff line number Diff line
[Unit]
Description=Kodi Media Center
Requires=dbus.socket
After=network.target
After=sound.target

[Service]
User=kodi
ExecStart=flatpak run --device=dri --filesystem=home --filesystem=/srv/library tv.kodi.Kodi --standalone --windowing=gbm
KillMode=control-group
Restart=always

[Install]
WantedBy=multi-user.target graphical.target
+44 −0
Original line number Diff line number Diff line
[Unit]
Description=Kodi Media Center on %i
After=systemd-user-sessions.service sound.target network-online.target

# Require the library to be mounted.
After=srv-library.mount

# D-Bus is necessary for contacting logind. Logind is required.
Wants=dbus.socket
After=dbus.socket

Conflicts=getty@%i.service
Before=graphical.target

# On systems without virtual consoles, don't start
ConditionPathExists=/dev/tty0

[Service]
User=kodi
PAMName=login
ExecStart=flatpak run --device=dri --filesystem=home --filesystem=/srv/library tv.kodi.Kodi --standalone --windowing=gbm -fs
Type=simple
Restart=on-abort
RestartSec=5
KillMode=control-group

# A virtual terminal is needed.
TTYPath=/dev/%i
TTYReset=yes
TTYVHangup=yes
TTYVTDisallocate=yes

# Fail to start if not controlling the tty.
StandardOutput=tty
StandardInput=tty
StandardError=journal

# Log this user with utmp, letting it show up with commands 'w' and 'who'.
UtmpIdentifier=%i
UtmpMode=user

[Install]
WantedBy=graphical.target
DefaultInstance=tty7
+3 −3
Original line number Diff line number Diff line
@@ -41,13 +41,13 @@

- name: Copy service
  copy:
    dest: /etc/systemd/system/kodi.service
    dest: /etc/systemd/system/
    mode: preserve
    src: kodi.service
    src: kodi@.service

- name: Enable service
  service:
    daemon-reload: true
    enabled: true
    name: kodi.service
    name: kodi@tty7.service
    state: started