Improve systemd units
Use the same dependencies and their order in both systemd units. Add additional units of services that kodi uses. Don't use "Requires=", kodi can run without a network connection. Export WINDOWING=x11 in kodi.service to skip the autodetection that /usr/bin/kodi-standalone performs. Give kodi-gbm.service the privileges of input group, this allows removing the kodi user from that group's membership since kodi.service does not need it.
This commit is contained in:
parent
ec902b8f97
commit
92036950d8
2
MIT
2
MIT
@ -1,4 +1,4 @@
|
|||||||
Copyright (c) 2014-2019 graysky
|
Copyright (c) 2014-2020 graysky
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ Users of Arch ARM should NOT use this method as the distro package provides anal
|
|||||||
### Other distros
|
### Other distros
|
||||||
Users of other distros should copy `kodi.service` and `kodi-gbm.service` to `/usr/lib/systemd/system/` and should create both a kodi user and home directory as follows:
|
Users of other distros should copy `kodi.service` and `kodi-gbm.service` to `/usr/lib/systemd/system/` and should create both a kodi user and home directory as follows:
|
||||||
```
|
```
|
||||||
useradd -c 'kodi user' -u 420 -g kodi -G audio,input,network,optical,uucp,video \
|
useradd -c 'kodi user' -u 420 -g kodi -G audio,network,optical,uucp,video \
|
||||||
-d /var/lib/kodi -s /usr/bin/nologin kodi
|
-d /var/lib/kodi -s /usr/bin/nologin kodi
|
||||||
|
|
||||||
passwd -l kodi > /dev/null
|
passwd -l kodi > /dev/null
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=Kodi standalone (GBM)
|
Description=Kodi standalone (GBM)
|
||||||
After=systemd-user-sessions.service network.target network-online.target sound.target upower.service mysqld.service
|
After=remote-fs.target systemd-user-sessions.service network-online.target nss-lookup.target sound.target bluetooth.target polkit.service upower.service mysqld.service
|
||||||
Requires=graphical.target
|
Wants=network-online.target polkit.service upower.service
|
||||||
Wants=network.target network-online.target
|
|
||||||
Conflicts=getty@tty1.service
|
Conflicts=getty@tty1.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
User=kodi
|
User=kodi
|
||||||
Group=kodi
|
Group=kodi
|
||||||
|
SupplementaryGroups=input
|
||||||
PAMName=login
|
PAMName=login
|
||||||
TTYPath=/dev/tty1
|
TTYPath=/dev/tty1
|
||||||
Environment=WINDOWING=gbm
|
Environment=WINDOWING=gbm
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=Kodi standalone (X11)
|
Description=Kodi standalone (X11)
|
||||||
After=systemd-user-sessions.service network-online.target sound.target mysqld.service
|
After=remote-fs.target systemd-user-sessions.service network-online.target nss-lookup.target sound.target bluetooth.target polkit.service upower.service mysqld.service
|
||||||
Requires=network-online.target
|
Wants=network-online.target polkit.service upower.service
|
||||||
Conflicts=getty@tty1.service
|
Conflicts=getty@tty1.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
@ -9,6 +9,7 @@ User=kodi
|
|||||||
Group=kodi
|
Group=kodi
|
||||||
PAMName=login
|
PAMName=login
|
||||||
TTYPath=/dev/tty1
|
TTYPath=/dev/tty1
|
||||||
|
Environment=WINDOWING=x11
|
||||||
ExecStart=/usr/bin/xinit /usr/bin/kodi-standalone -- :0 -nolisten tcp vt1
|
ExecStart=/usr/bin/xinit /usr/bin/kodi-standalone -- :0 -nolisten tcp vt1
|
||||||
Restart=on-abort
|
Restart=on-abort
|
||||||
StandardInput=tty
|
StandardInput=tty
|
||||||
|
Loading…
Reference in New Issue
Block a user