mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-17 14:33:00 +02:00
update-ids-ruleset: Lock and Unlock the IDS page during runtime
Reference #11991 Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user