From f7eedacb43e81dd8acd031f1ed7680fd0bf3b2b9 Mon Sep 17 00:00:00 2001 From: Stefan Schantl Date: Sat, 16 Apr 2022 15:51:06 +0200 Subject: [PATCH] convert-ids-backend-files: Restart suricata if the IDS is running. Signed-off-by: Stefan Schantl --- config/suricata/convert-ids-backend-files | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/config/suricata/convert-ids-backend-files b/config/suricata/convert-ids-backend-files index 302ed5232..825a32c79 100644 --- a/config/suricata/convert-ids-backend-files +++ b/config/suricata/convert-ids-backend-files @@ -243,3 +243,13 @@ foreach my $file (@files_to_drop) { # Remove the file if it exists. unlink("$file") if (-f "$file"); } + +# +## Step 8: Restart the IDS if running. +# + +# Check if the IDS is running. +if(&IDS::ids_is_running()) { + # Call suricatactrl to perform the restart. + &IDS::call_suricatactrl("restart"); +}