mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
kodi.sh: Do not overwrite kodi_crashlog.log, keep 10 youngest crashlogs.
This commit is contained in:
parent
4a1b9f7435
commit
7dceca0409
@ -48,7 +48,8 @@ print_crash_report()
|
||||
if [ ! -d $CRASHLOG_DIR ] ; then
|
||||
mkdir -p $CRASHLOG_DIR
|
||||
fi
|
||||
FILE="$CRASHLOG_DIR/kodi_crashlog.log"
|
||||
DATE=`date +%Y%m%d%H%M%S`
|
||||
FILE="$CRASHLOG_DIR/kodi_crashlog_$DATE.log"
|
||||
echo "############## kodi CRASH LOG ###############" > $FILE
|
||||
echo >> $FILE
|
||||
echo "################ SYSTEM INFO ################" >> $FILE
|
||||
@ -95,6 +96,9 @@ RET=$?
|
||||
if [ $(( ($RET >= 131 && $RET <= 136) || $RET == 139 )) = "1" ] ; then
|
||||
# Crashed with core dump
|
||||
print_crash_report
|
||||
|
||||
# Cleanup. Keep only youngest 10 reports
|
||||
rm -f $(ls -1t $CRASHLOG_DIR/kodi_crashlog_*.log | tail -n +11)
|
||||
fi
|
||||
|
||||
exit $RET
|
||||
|
Loading…
x
Reference in New Issue
Block a user