diff --git a/packages/mediacenter/kodi/system.d/kodi-autostart.service b/packages/mediacenter/kodi/system.d/kodi-autostart.service index e3fbd81454..9398f52865 100644 --- a/packages/mediacenter/kodi/system.d/kodi-autostart.service +++ b/packages/mediacenter/kodi/system.d/kodi-autostart.service @@ -2,13 +2,14 @@ Description=Kodi user autostart script Before=kodi.service After=network-online.target graphical.target -ConditionPathExists=/storage/.config/autostart.sh [Service] Type=oneshot Environment=HOME=/storage -ExecStart=-/bin/sh -c ". /etc/profile; exec /bin/sh /storage/.config/autostart.sh" +ExecStart=-/bin/sh -c ". /etc/profile; test -f /storage/.config/autostart.sh && exec /bin/sh /storage/.config/autostart.sh" +ExecStop=-/bin/sh -c ". /etc/profile; test -f /storage/.config/autostop.sh && exec /bin/sh /storage/.config/autostop.sh" RemainAfterExit=yes +TimeoutStopSec=5min [Install] WantedBy=kodi.service