# Call oinkmaster to alter the ruleset.
&IDS::oinkmaster();
+ # Check if the IDS is running.
+ if(&IDS::is_ids_running()) {
+ # Call suricatactrl to perform a reload.
+ &IDS::call_suricatactrl("reload");
+ }
+
# Reload page.
&reload();
# Call subfunction to launch oinkmaster.
&IDS::oinkmaster();
+ # Check if the IDS is running.
+ if(&IDS::is_ids_running()) {
+ # Call suricatactrl to perform a reload.
+ &IDS::call_suricatactrl("reload");
+ }
+
# Perform a reload of the page.
&reload();
}
# Generate file to store the home net.
&generate_home_net_file();
+
+ # Check if the IDS currently is running.
+ if(&IDS::ids_is_running()) {
+ # Check if ENABLE_IDS is set to on.
+ if($cgiparams{'ENABLE_IDS'} eq "on") {
+ # Call suricatactrl to perform a reload of suricata.
+ &IDS::call_suricatactrl("reload");
+ } else {
+ # Call suricatactrl to stop suricata.
+ &IDS::call_suricatactrl("stop");
+ }
+ } else {
+ # Call suricatactrl to start suricata.
+ &IDS::call_suricatactrl("start");
+ }
}
# Read-in idssettings