suricata: Give 644 permissions to the suricata pidfile

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
This commit is contained in:
Stefan Schantl
2018-08-17 08:24:19 +02:00
parent 04b5c77a45
commit 00a031145e

View File

@@ -32,6 +32,9 @@ network_zones=( red green blue orange )
MARK="0x1" MARK="0x1"
MASK="0x1" MASK="0x1"
# PID file of suricata.
PID_FILE="/var/run/suricata.pid"
case "$1" in case "$1" in
start) start)
# Get amount of CPU cores. # Get amount of CPU cores.
@@ -78,12 +81,15 @@ case "$1" in
boot_mesg "Starting Intrusion Detection System..." boot_mesg "Starting Intrusion Detection System..."
/usr/bin/suricata -c /etc/suricata/suricata.yaml -D $NFQUEUES /usr/bin/suricata -c /etc/suricata/suricata.yaml -D $NFQUEUES
evaluate_retval evaluate_retval
# Allow reading the pidfile.
chmod 644 $PID_FILE
fi fi
;; ;;
stop) stop)
boot_mesg "Stopping Intrusion Detection System..." boot_mesg "Stopping Intrusion Detection System..."
killproc -p /var/run/suricata.pid /var/run killproc -p $PID_FILE /var/run
# Flush firewall chain. # Flush firewall chain.
iptables -F $FW_CHAIN iptables -F $FW_CHAIN