From: Stefan Schantl Date: Wed, 29 Aug 2018 09:50:59 +0000 (+0200) Subject: ids.cgi: Create file for used rulefiles on first execution if not present X-Git-Tag: suricata-beta3~18 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=00512a5ac800205a9f46cd0936909d5c921e6643;p=people%2Fstevee%2Fipfire-2.x.git ids.cgi: Create file for used rulefiles on first execution if not present Create this file on first execution of the script if it does not exist yet. This will allow suricata to imediately be started. Otherwise the ruleset has to be downloaded and configured before this file has been created and suricata could be launched. Fixes #11833. Signed-off-by: Stefan Schantl --- diff --git a/html/cgi-bin/ids.cgi b/html/cgi-bin/ids.cgi index 045211298f..979dcbcb70 100644 --- a/html/cgi-bin/ids.cgi +++ b/html/cgi-bin/ids.cgi @@ -64,10 +64,11 @@ my $modify_sids_file = "$IDS::settingsdir/oinkmaster-modify-sids.conf"; my $errormessage; -# Create oinkmaster related files if they does not exist yet. +# Create files if they does not exist yet. unless (-f "$enabled_sids_file") { &IDS::create_empty_file($enabled_sids_file); } unless (-f "$disabled_sids_file") { &IDS::create_empty_file($disabled_sids_file); } unless (-f "$modify_sids_file") { &IDS::create_empty_file($modify_sids_file); } +unless (-f "$idsusedrulefilesfile") { &IDS::create_empty_file($idsusedrulefilesfile); } &Header::showhttpheaders();