]> git.ipfire.org Git - people/stevee/ipfire-2.x.git/commitdiff
convert-ids-modification-files: Cleanup oinkmaster files during runtime.
authorStefan Schantl <stefan.schantl@ipfire.org>
Sun, 20 Mar 2022 18:06:46 +0000 (19:06 +0100)
committerStefan Schantl <stefan.schantl@ipfire.org>
Sun, 20 Mar 2022 18:06:46 +0000 (19:06 +0100)
Remove old oinkmaster modification files and main oinkmaster
configuration file during runtime.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
config/suricata/convert-ids-modification-files

index 555deaf181a25892834bb1a7d16ac812a7fad281..ccbecfa040bc0750fd669b9ce221d6f2c8ce106e 100644 (file)
@@ -77,4 +77,13 @@ foreach my $provider (@providers) {
 
        # Set correct ownership for the new modifications file.
        &IDS::set_ownership("$new_modifications_file");
+
+       # Drop old modification file.
+       unlink("$old_modifications_file");
 }
+
+# Drop old oinkmaster.conf.
+unlink("$IDS::settingsdir/oinkmaster.conf");
+
+# Finished.
+exit 0;