Commit Graph

6 Commits

Author SHA1 Message Date
graysky
8c5d854a36 back to user.slice
It seems that as long as the Kodi menu is used to call a shutdown or reboot,
the services will allow the application to gracefully exit including saving
settings, uptime etc.  This will only NOT occur if the user calls the box to
shutdown or reboot via a call to systemctl for the reasons cited in previous
commits.

While not optimal, it is consistent with the same thing happening if others
users are logged into the box, working, and a sysadmin calls the systemctl
to reboot.  The result is users will lose work/data.

Going back to the user.slice is better for USB mounts, and for pulseaudio
sessions as well.
2021-01-03 21:15:41 -05:00
graysky
80d6d44698 Revert "Consistent behavior on a systemctl stop vs reboot"
This reverts commit 34515c3338.
2021-01-03 08:27:01 -05:00
graysky
34515c3338 Consistent behavior on a systemctl stop vs reboot
If I call systemctl to shutdown or reboot, the effect is that it does
not honor kodi-x11.service's ExecStop= line which results in an
unclean exit of kodi and of data loss since kodi writes out some data
when it exits.  By contrast, calling systemctl to stop the service
works as expected.

It seems systemd treats processes in user.slice differently that those
in system.slice and that removing PAMName=login was to blame for kodi's
processes running in user.slice.

Discussion:
https://lists.freedesktop.org/archives/systemd-devel/2020-December/045713.html
https://bbs.archlinux.org/viewtopic.php?id=261684
2020-12-16 13:32:25 -05:00
graysky
847b6ec656 better ExecStop to cleanly exit fixes #23 and #24
Direct call to kodi-xxx in ExecStart= allows direction of kill signal to that
rather than to kodi-standalone wrapper.  This allows the kill signal to hit
the indented executable.  As well, using killall in the ExecStop= allows for
synchronous stopping and for kodi to do shutdown housekeeping tasks such as
saving settings, stopping services (web, zeroconf, etc.) and unloading things.
2020-10-24 14:52:18 -04:00
graysky
aa83f6cc27 fixes #14 2020-05-05 05:56:44 -04:00
graysky
d2cb656955 recursively set ownership on /var/lib/kodi/ to allow any uid/gid 2020-01-14 10:07:11 -05:00