From 3aa175f78165640be41746b970802b5ea820ef7c Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Mon, 26 Nov 2012 11:05:49 +0100 Subject: [PATCH] sarg: Remove all previously created reports of "today". --- config/sarg/update-sarg-reports | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/config/sarg/update-sarg-reports b/config/sarg/update-sarg-reports index 84a7052bc6..9f2ab4c8cd 100644 --- a/config/sarg/update-sarg-reports +++ b/config/sarg/update-sarg-reports @@ -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} } -- 2.39.2