]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
update-ids-ruleset: Lock and Unlock the IDS page during runtime
authorStefan Schantl <stefan.schantl@ipfire.org>
Thu, 7 Feb 2019 07:06:49 +0000 (08:06 +0100)
committerStefan Schantl <stefan.schantl@ipfire.org>
Thu, 7 Feb 2019 07:06:49 +0000 (08:06 +0100)
Reference #11991

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
src/scripts/update-ids-ruleset

index d988d2556684d89cabb1ecd049dd65e558fa105a..14ea25ec6ce7106fcf2ef7495535e5b1d0dfb2ae 100644 (file)
@@ -46,6 +46,9 @@ if(&IDS::checkdiskspace()) {
        exit 0;
 }
 
+# Lock the IDS page.
+&IDS::lock_ids_page();
+
 # Call the download function and gather the new ruleset.
 if(&IDS::downloadruleset()) {
        # Store error message for displaying in the WUI.
@@ -61,6 +64,9 @@ if(&IDS::downloadruleset()) {
 # Set correct ownership for the rulesdir and files.
 &IDS::set_ownership("$IDS::rulespath");
 
+# Unlock the IDS page.
+&IDS::unlock_ids_page();
+
 # Check if the IDS is running.
 if(&IDS::ids_is_running()) {
        # Call suricatactrl to perform a reload.