]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - config/sarg/update-sarg-reports
core125: Ship JSON-C
[people/pmueller/ipfire-2.x.git] / config / sarg / update-sarg-reports
index 84a7052bc6321565cf893aef8c05b98f8e000a61..9f2ab4c8cdf4550daa9d87164b37ffbb572f4463 100644 (file)
@@ -95,6 +95,13 @@ function compile_report() {
        local reports_path="${REPORTS_PATH}/${interval}"
        mkdir -p ${reports_path}
 
+       # Remove already existant data on today's reports.
+       case "${interval}" in
+               today)
+                       rm -rf ${reports_path}/*
+                       ;;
+       esac
+
        # Run SARG.
        get_logs ${max_logs} | sarg -f ${SARG_CONFIG} -l - -d ${date} -o ${reports_path}
 }