mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-08-02 07:27:49 +00:00
xbmc: rework shutdown and error handling
Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
parent
bf06a26a69
commit
006a72d456
@ -52,12 +52,25 @@ progress "starting XBMC"
|
||||
|
||||
DISPLAY=:0.0 xbmc $XBMC_ARGS > /dev/null 2>&1
|
||||
RET=$?
|
||||
echo "Exited with code $RET"
|
||||
echo "Last XBMC Exitcode: $RET" >> /storage/.xbmc/last_exit.log
|
||||
|
||||
[ "$RET" == 0 ] && sync && poweroff
|
||||
[ "$RET" == 64 ] && sync && poweroff
|
||||
[ "$RET" == 66 ] && sync && reboot
|
||||
case "$RET" in
|
||||
0)
|
||||
poweroff -f
|
||||
;;
|
||||
64)
|
||||
poweroff -f
|
||||
;;
|
||||
66)
|
||||
reboot
|
||||
;;
|
||||
255)
|
||||
echo "Abnormal Exit. Exited with code $RET"
|
||||
echo "is Xorg running? check /var/log/Xorg.log"
|
||||
;;
|
||||
*)
|
||||
echo "Abnormal Exit. Exited with code $RET"
|
||||
;;
|
||||
esac
|
||||
|
||||
usleep 250000
|
||||
done
|
||||
|
Loading…
x
Reference in New Issue
Block a user