diff --git a/ChangeLog.md b/ChangeLog.md index a2637ad..8332739 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -28,7 +28,6 @@ * verbose logging * logcat init.d Script - * move logs from `/data/adb/logcat` to `/data/media/0/logcats` * verbose logging of the script itself * simplify code diff --git a/Full/system/etc/init.d/logcat b/Full/system/etc/init.d/logcat index bfeac87..9ef7630 100755 --- a/Full/system/etc/init.d/logcat +++ b/Full/system/etc/init.d/logcat @@ -3,18 +3,7 @@ # wait until boot completed until [ `getprop sys.boot_completed`. = 1. ]; do sleep 1; done -# select storage path -if [ -n ${EXTERNAL_STORAGE} ]; then - LOGDIR="${EXTERNAL_STORAGE}/logcats" -else - if [ -w /sdcard ]; then - LOGDIR="/sdcard/logcats" - elif [ -w /storage/self/primary ]; then - LOGDIR="/storage/self/primary/logcats" - elif [ -w /data/media/0 ]; then - LOGDIR="/data/media/0/logcats" - fi -fi +LOGDIR="/data/adb/logcats" echo "logcat init script" echo "Starting Automatic Cleaning at $(date +"%m-%d-%Y %H:%M:%S")" @@ -22,7 +11,7 @@ echo "Starting Automatic Cleaning at $(date +"%m-%d-%Y %H:%M:%S")" [[ ! -d ${LOGDIR} ]] && mkdir -p ${LOGDIR} # remove files older than a week to prevent pollution -find /data/adb/logcat/ -print -mtime +8 -exec rm -f {} \; 2>/dev/null +find ${LOGDIR} -print -mtime +8 -exec rm -f {} \; 2>/dev/null echo "Automatic Cleaning finished at $(date +"%m-%d-%Y %H:%M:%S")" diff --git a/README.md b/README.md index 7ac315c..9df7442 100644 --- a/README.md +++ b/README.md @@ -405,7 +405,7 @@ The following init scripts are bundled with NanoDroid * fstrim * trim file systems (may increase speed) * logcat - * store logcat in /data/media/0/logcats + * store logcat in /data/adb/logcats * logs older than 7 days are deleted on every reboot * logscleaner * clean up system log files older than 7 days