bundles/kodi: introduce

This commit is contained in:
Franzi 2020-10-03 13:36:12 +02:00
parent fc44a9cd69
commit 32fd2f7a7b
Signed by: kunsi
GPG key ID: 12E3D2136B818350
5 changed files with 88 additions and 0 deletions

View file

@ -0,0 +1,2 @@
allowed_users=anybody
needs_root_rights=yes

View file

@ -0,0 +1,18 @@
[Unit]
Description=Kodi
Conflicts=getty@tty7.service
After=systemd-user-sessions.service getty@tty7.service plymouth-quit.service
StartLimitIntervalSec=2
[Service]
User=kodi
Type=simple
ExecStart=/usr/bin/xinit /usr/bin/kodi-standalone -- :0 vt7 -nocursor
WorkingDirectory=/home/kodi
StandardOutput=journal
Restart=always
RestartSec=2
[Install]
WantedBy=graphical.target
Alias=display-manager.service

View file

@ -0,0 +1,10 @@
[Unit]
Description=PulseAudio for user kodi
[Service]
User=kodi
Type=simple
ExecStart=pulseaudio --realtime --log-target=journal --daemonize=no
[Install]
WantedBy=kodi.service

33
bundles/kodi/items.py Normal file
View file

@ -0,0 +1,33 @@
files = {
'/etc/systemd/system/kodi.service': {
'triggers': {
'action:systemd-reload',
'svc_systemd:kodi:restart',
},
},
'/etc/systemd/system/pulseaudio.service': {
'triggers': {
'action:systemd-reload',
'svc_systemd:pulseaudio:restart',
},
},
'/etc/X11/Xwrapper.config': {},
}
svc_systemd = {
'kodi': {
'needs': {
'file:/etc/systemd/system/kodi.service',
'file:/etc/X11/Xwrapper.config',
'pkg_apt:kodi',
'user:kodi',
'svc_systemd:pulseaudio',
},
},
'pulseaudio': {
'needs': {
'file:/etc/systemd/system/pulseaudio.service',
'pkg_apt:pulseaudio',
},
},
}

25
bundles/kodi/metadata.py Normal file
View file

@ -0,0 +1,25 @@
defaults = {
'apt': {
'packages': {
'cec-utils': {},
'fonts-noto': {},
'fonts-roboto': {},
'kodi': {},
'libcec4': {},
'pulseaudio': {},
'pulseaudio-utils': {},
'ttf-mscorefonts-installer': {},
'tv-fonts': {},
'xfonts-base': {},
'xserver-xorg-legacy': {},
},
},
'users': {
'kodi': {
'groups': {
'audio',
'tty',
},
},
},
}