]>
git.ipfire.org Git - ipfire-2.x.git/blob - src/initscripts/networking/red.up/23-suricata
3 # Helper script to regenerate the file which contains the HOME_NET declaration
4 # including the assigned IP-address of red and any configured aliases.
8 require '/var/ipfire/general-functions.pl';
9 require "${General::swroot}/ids-functions.pl";
11 # Hash to store the IDS settings.
12 my %ids_settings = ();
14 # Read-in IDS settings.
15 &General
::readhash
("$IDS::ids_settings_file", \
%ids_settings);
17 # Check if suricata is enabled.
18 if($ids_settings{'ENABLE_IDS'} eq "on") {
19 # Regenerate the file with HOME_NET details.
20 &IDS
::generate_home_net_file
();
22 # Set correct ownership.
23 &IDS
::set_ownership
("$IDS::homenet_file");
25 # Check if suricata is running.
26 if(&IDS
::ids_is_running
()) {
27 # Call suricatactrl to perform a restart of suricata.
28 &IDS
::call_suricatactrl
("restart");