mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-28 11:43:25 +02:00
sarg: Remove all previously created reports of "today".
This commit is contained in:
@@ -95,6 +95,13 @@ function compile_report() {
|
|||||||
local reports_path="${REPORTS_PATH}/${interval}"
|
local reports_path="${REPORTS_PATH}/${interval}"
|
||||||
mkdir -p ${reports_path}
|
mkdir -p ${reports_path}
|
||||||
|
|
||||||
|
# Remove already existant data on today's reports.
|
||||||
|
case "${interval}" in
|
||||||
|
today)
|
||||||
|
rm -rf ${reports_path}/*
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
# Run SARG.
|
# Run SARG.
|
||||||
get_logs ${max_logs} | sarg -f ${SARG_CONFIG} -l - -d ${date} -o ${reports_path}
|
get_logs ${max_logs} | sarg -f ${SARG_CONFIG} -l - -d ${date} -o ${reports_path}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user