Index: scripts/factory_reset.sh =================================================================== diff -u -rb409d283b24475268c386ab6756b0a60fe9b48b2 -r9a8412f742caf6491cf888843155a32040de4c04 --- scripts/factory_reset.sh (.../factory_reset.sh) (revision b409d283b24475268c386ab6756b0a60fe9b48b2) +++ scripts/factory_reset.sh (.../factory_reset.sh) (revision 9a8412f742caf6491cf888843155a32040de4c04) @@ -194,9 +194,17 @@ # - not part of the checking whether deletion was successful # - setting maxDepth to 2 due to path used is root level with sd-card/ folders of logs # NOTE: find command always return true / non-zero! when using with exec - find "$LOC_LOG_BASE_FOLDER" -maxdepth 2 -type f -daystart -mtime +0 | xargs rm + # TODO: Checking the file count should be fixed later + + # Remove the contents of the log folder + rm "$LOC_LOG_BASE_FOLDER"/log/* _has_error_=!$? exitError $_has_error_ $ERR_REMOVE_CMD_FIL "Log file deletion" + + # Remove the contents of the service folder + rm "$LOC_LOG_BASE_FOLDER"/service/* + _has_error_=!$? + exitError $_has_error_ $ERR_REMOVE_CMD_FIL "Service file deletion" fileCount=$(find "$LOC_LOG_BASE_FOLDER" -maxdepth 2 -type f -daystart -mtime +0 | wc -l) _has_error_=$fileCount