aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/Linux/kodi-standalone.sh.in8
-rw-r--r--tools/Linux/kodi.sh.in4
2 files changed, 6 insertions, 6 deletions
diff --git a/tools/Linux/kodi-standalone.sh.in b/tools/Linux/kodi-standalone.sh.in
index dc902b4d7e..956e193864 100644
--- a/tools/Linux/kodi-standalone.sh.in
+++ b/tools/Linux/kodi-standalone.sh.in
@@ -30,21 +30,21 @@ LOOP=1
CRASHCOUNT=0
LASTSUCCESSFULSTART=$(date +%s)
-while [ $(( $LOOP )) = "1" ]
+while [ $LOOP -eq 1 ]
do
$APP
RET=$?
NOW=$(date +%s)
- if [ $(( ($RET >= 64 && $RET <=66) || $RET == 0 )) = "1" ]; then # clean exit
+ if [ $RET -ge 64 ] && [ $RET -le 66 ] || [ $RET -eq 0 ]; then # clean exit
LOOP=0
else # crash
DIFF=$((NOW-LASTSUCCESSFULSTART))
- if [ $(($DIFF > 60 )) = "1" ]; then # Not on startup, ignore
+ if [ $DIFF -gt 60 ]; then # Not on startup, ignore
LASTSUCESSFULSTART=$NOW
CRASHCOUNT=0
else # at startup, look sharp
CRASHCOUNT=$((CRASHCOUNT+1))
- if [ $(($CRASHCOUNT >= 3)) = "1" ]; then # Too many, bail out
+ if [ $CRASHCOUNT -ge 3 ]; then # Too many, bail out
LOOP=0
echo "${APP} has exited in an unclean state 3 times in the last ${DIFF} seconds."
echo "Something is probably wrong"
diff --git a/tools/Linux/kodi.sh.in b/tools/Linux/kodi.sh.in
index 108c0b007b..11cace29a5 100644
--- a/tools/Linux/kodi.sh.in
+++ b/tools/Linux/kodi.sh.in
@@ -180,10 +180,10 @@ do
CHILD=$!
wait "${CHILD}"
RET=$?
- if [ $(( $RET == 65 )) = "1" ]
+ if [ $RET -eq 65 ]
then # User requested to restart app
LOOP=1
- elif [ $(( ($RET >= 131 && $RET <= 136) || $RET == 139 )) = "1" ]
+ elif [ $RET -ge 131 ] && [ $RET -le 136 ] || [ $RET -eq 139 ]
then # Crashed with core dump
print_crash_report
fi