Fix pandoradb delete old netdlow data

This commit is contained in:
Calvo 2023-09-01 13:07:48 +02:00
parent aac8aa43fd
commit d9bfa56e9a
1 changed files with 6 additions and 1 deletions

View File

@ -359,7 +359,12 @@ sub pandora_purgedb ($$$) {
log_message ('!', "Cannot execute " . $conf->{'_netflow_nfexpire'} . ", skipping.");
}
else {
`yes 2>/dev/null | $conf->{'_netflow_nfexpire'} -r "$conf->{'_netflow_path'}" -t $conf->{'_netflow_max_lifetime'}d`;
# Update stats file with max lifetime.
`yes 2>/dev/null | $conf->{'_netflow_nfexpire'} -u "$conf->{'_netflow_path'}" -t $conf->{'_netflow_max_lifetime'}d`;
# Rescan directory.
`yes 2>/dev/null | $conf->{'_netflow_nfexpire'} -r "$conf->{'_netflow_path'}"`;
# Expire files
`yes 2>/dev/null | $conf->{'_netflow_nfexpire'} -e "$conf->{'_netflow_path'}"`;
}
}
else {