mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2026-01-23 16:33:29 +01:00
addfirewall.sh - add logic so it doesn't retry to add firewall rules
This commit is contained in:
@@ -5,5 +5,9 @@
|
||||
POLICY=$1
|
||||
IPADDRESS=$2
|
||||
|
||||
echo " - $2" >> /opt/so/saltstack/pillar/firewall/$1.sls
|
||||
salt-call state.apply firewall
|
||||
if grep -q $2 "/opt/so/saltstack/pillar/firewall/$1.sls"; then
|
||||
echo "Firewall Rule Already There"
|
||||
else
|
||||
echo " - $2" >> /opt/so/saltstack/pillar/firewall/$1.sls
|
||||
salt-call state.apply firewall
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user