logscleaner init.d Script: clean-up old logcats here

merge-requests/23/head
Christopher Roy Bratusek 5 years ago
parent 4cf0e3c507
commit d70870c583

@ -10,9 +10,6 @@ echo "Starting Automatic Cleaning at $(date +%Y%m%d-%H.%M.%S)"
[[ ! -d ${LOGDIR} ]] && mkdir -p ${LOGDIR}
# remove files older than a week to prevent pollution
find ${LOGDIR} -print -mtime +8 -exec rm -f {} \; 2>/dev/null
echo "Automatic Cleaning finished at $(date +%Y%m%d-%H.%M.%S)"
# Set current date in 20170607-12.07.25 format

@ -35,9 +35,9 @@ for logpath in /cache /cache/recovery /data/system/dropbox; do
done
# NanoDroid init.d logs
if [ -d /data/adb/modules/NanoDroid/logs ]; then
find /data/adb/modules/NanoDroid/logs -mtime +8 -type f \
for logpath in /data/adb/modules/NanoDroid/logs /data/adb/logcats; do
find ${logpath} -mtime +8 -type f \
-print -exec rm -f {} \; 2>/dev/null
fi
done
echo "Automatic Cleaning finished at $(date +%Y%m%d-%H.%M.%S)"

Loading…
Cancel
Save