]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
initscripts: Fix bash function definitions in suricata
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 9 Sep 2024 09:54:04 +0000 (11:54 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 24 Sep 2024 08:41:53 +0000 (08:41 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/initscripts/system/suricata

index 253ece11757d12d392755bc5fa0a8f781a4ea250..0c60c511989535e9934ba25b5739e5eb115dca16 100644 (file)
@@ -52,7 +52,7 @@ enabled_ips_zones=()
 PID_FILE="/var/run/suricata.pid"
 
 # Function to get the amount of CPU cores of the system.
-function get_cpu_count {
+get_cpu_count() {
        CPUCOUNT=0
 
        # Loop through "/proc/cpuinfo" and count the amount of CPU cores.
@@ -70,12 +70,12 @@ function get_cpu_count {
 }
 
 # Function to flush the firewall chains.
-function flush_fw_chain {
+flush_fw_chain() {
        iptables -w -t mangle -F IPS
 }
 
 # Function to create the firewall rules to pass the traffic to suricata.
-function generate_fw_rules {
+generate_fw_rules() {
        # Assign NFQ_OPTS
        local NFQ_OPTIONS=( "${NFQ_OPTS[@]}" )