]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
suricata: Start the new watcher in the background
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 9 Sep 2024 21:08:11 +0000 (23:08 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 24 Sep 2024 08:42:37 +0000 (08:42 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/initscripts/system/suricata

index 40bd69c87b2da5a8d7bf7b03d6908e1338eeaeed..455715d1b43d0acbdd4114b91a7c27718eb17383 100644 (file)
@@ -43,9 +43,6 @@ NFQ_OPTS=(
        "--queue-bypass"
 )
 
-# PID file of suricata.
-PID_FILE="/var/run/suricata.pid"
-
 # Function to flush the firewall chains.
 flush_fw_chain() {
        iptables -w -t mangle -F IPS
@@ -123,8 +120,7 @@ case "$1" in
                if [ "$ENABLE_IDS" == "on" ]; then
                        # Start the IDS.
                        boot_mesg "Starting Intrusion Detection System..."
-                       /usr/bin/suricata-watcher -c /etc/suricata/suricata.yaml $NFQUEUES
-                       evaluate_retval
+                       loadproc -b /usr/bin/suricata-watcher -c /etc/suricata/suricata.yaml $NFQUEUES
 
                        # Flush the firewall chain
                        flush_fw_chain