3 # We're called with the real Kodi executable as
4 # first argument, followed by any Kodi extra args
8 # In case someone asked we terminate, just kill
14 trap trap_kill INT QUIT TERM
17 while [ ${LOOP} -eq 1 ]; do
18 # Hack: BusyBox ash does not catch signals while a non-builtin
19 # is running, and only catches the signal when the non-builtin
20 # command ends. So, we just background the Kodi binary, and wait
21 # for it. But BusyBox' ash's wait builtin does not return the
22 # exit code even if there was only one job (which is correct
23 # for POSIX). So we explicitly wait for the Kodi job
29 64) poweroff
; LOOP
=0;;