]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - src/scripts/update-ids-ruleset
update-ids-ruleset: Improve error reporting if the system is offline
[ipfire-2.x.git] / src / scripts / update-ids-ruleset
index fe4f838445cd70cabe3406208e803fbf8fb7dc70..d988d2556684d89cabb1ecd049dd65e558fa105a 100644 (file)
@@ -31,7 +31,7 @@ unless (-e "${General::swroot}/red/active") {
        &IDS::_log_to_syslog("The system is offline.");
 
        # Store error message for displaying in the WUI.
-       &IDS::_store_error_message("$Lang::tr{'could not download latest updates'}");
+       &IDS::_store_error_message("$Lang::tr{'could not download latest updates'} - $Lang::tr{'system is offline'}");
 
        # Exit.
        exit 0;
@@ -58,6 +58,9 @@ if(&IDS::downloadruleset()) {
 # Call oinkmaster to alter the ruleset.
 &IDS::oinkmaster();
 
+# Set correct ownership for the rulesdir and files.
+&IDS::set_ownership("$IDS::rulespath");
+
 # Check if the IDS is running.
 if(&IDS::ids_is_running()) {
        # Call suricatactrl to perform a reload.