mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-08-02 23:47: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
|
DISPLAY=:0.0 xbmc $XBMC_ARGS > /dev/null 2>&1
|
||||||
RET=$?
|
RET=$?
|
||||||
echo "Exited with code $RET"
|
|
||||||
echo "Last XBMC Exitcode: $RET" >> /storage/.xbmc/last_exit.log
|
|
||||||
|
|
||||||
[ "$RET" == 0 ] && sync && poweroff
|
case "$RET" in
|
||||||
[ "$RET" == 64 ] && sync && poweroff
|
0)
|
||||||
[ "$RET" == 66 ] && sync && reboot
|
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
|
usleep 250000
|
||||||
done
|
done
|
||||||
|
Loading…
x
Reference in New Issue
Block a user