From 7cfe729d29df36d49dc1c0d76e6e0d528e027eca Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Mon, 16 Sep 2019 14:16:16 +0200 Subject: [PATCH] kodi: give kodi enough time to properly shut down The current stop timeout of 5 seconds is way too low and leads to systemd frequently killing kodi while it's still shutting down. This is really bad since it can potentially lead to corrupted files or databases and should be avoided at all costs. eg plain kodi 18.4 setup with only pvr.hts installed takes about 6 seconds to stop on RPi4. Increase the stop timeout to 30 seconds to allow proper shutdown on slower systems. While that is still a lot lower than the 90 seconds systemd default it should both be enough for very slow systems and also for us and users to notice kodi issues - in which case those issues have to be investigated. Signed-off-by: Matthias Reichl --- packages/mediacenter/kodi/system.d/kodi.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/mediacenter/kodi/system.d/kodi.service b/packages/mediacenter/kodi/system.d/kodi.service index 4cd8406f35..97f7dd4f14 100644 --- a/packages/mediacenter/kodi/system.d/kodi.service +++ b/packages/mediacenter/kodi/system.d/kodi.service @@ -18,7 +18,7 @@ ExecStartPre=-/usr/lib/kodi/kodi-config ExecStart=/usr/lib/kodi/kodi.sh --standalone -fs $KODI_ARGS $KODI_DEBUG ExecStop=/bin/kill -TERM $MAINPID ExecStopPost=-/usr/lib/kodi/kodi-safe-mode -TimeoutStopSec=5 +TimeoutStopSec=30 Restart=always RestartSec=2 StartLimitInterval=0