kodi: add shutdown hook to autostart

This commit is contained in:
Chad Wagner 2022-01-16 08:49:43 -05:00
parent a5fc6876d8
commit 7ce98a88c8
No known key found for this signature in database
GPG Key ID: DF8D3D475337FA8E

View File

@ -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