update README with shutdown/reboot best practices

This commit is contained in:
graysky 2021-01-30 11:24:33 -05:00
parent 84cfa7155d
commit 1d7662994d
1 changed files with 15 additions and 0 deletions

View File

@ -37,6 +37,21 @@ Simply [start/enable](https://wiki.archlinux.org/index.php/Systemd#Using_units)
## Passing environment variables to the service
Should the need arise, one can pass environment variables to the service by creating `/etc/conf.d/kodi-standalone` and populating it with the needed variables.
## Notes on system shutdown/reboot
Be aware that these services run Kodi in systemd's user.slice not in the system.slice. In order to have Kodi gracefully exit, the system should be called to shutdown or to reboot using the respective Kodi actions not by a call to systemctl. Failure to do so will result in an ungraceful exit of Kodi and the saving of GUI settings, Kodi uptime etc. will not occur. In principal this is no different than data loss occurring from a user doing work when a sysadmin issues a reboot command without prior warning. While it is possible to run Kodi in systemd's system.slice instead, doing so makes it difficult to use USB mounts within Kodi and to use pulseaudio for Kodi sessions.
### Recommended methods to reboot/shutdown
Here are several options:
* Select the corresponding option under Power menu in the Kodi GUI.
* Use the official Android/iOS remote app.
* If a CLI option is preferred, use `kodi-send` to issue a `ShutDown()` or `Reboot` like so:
```
$ kodi-send -a "Reboot"
$ kodi-send -a "ShutDown()"
```
## Acknowledgments
Much of the credit for this service goes to the Arch Linux maintainers of the official kodi package. Note that they removed it upon the [1.16-1 release of Xorg](https://git.archlinux.org/svntogit/community.git/commit/trunk?h=packages/xbmc&id=9763c6d32678f3a3f45c195bfae92eee209d504f).