From: Michael Tremer Date: Mon, 26 Nov 2012 10:05:49 +0000 (+0100) Subject: sarg: Remove all previously created reports of "today". X-Git-Tag: v2.11-core65~1^2~25 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3aa175f78165640be41746b970802b5ea820ef7c;p=people%2Fms%2Fipfire-2.x.git sarg: Remove all previously created reports of "today". --- 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} }