mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-19 23:43:07 +01:00
merge with dev and fix conflicts
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# This script adds ip addresses to specific rule sets defined by the user
|
||||
|
||||
local_salt_dir=/opt/so/saltstack/local
|
||||
POLICY=$1
|
||||
IPADDRESS=$2
|
||||
|
||||
if grep -q $2 "/opt/so/saltstack/pillar/firewall/$1.sls"; then
|
||||
if grep -q $2 "$local_salt_dir/pillar/firewall/$1.sls"; then
|
||||
echo "Firewall Rule Already There"
|
||||
else
|
||||
echo " - $2" >> /opt/so/saltstack/pillar/firewall/$1.sls
|
||||
echo " - $2" >> $local_salt_dir/pillar/firewall/$1.sls
|
||||
salt-call state.apply firewall queue=True
|
||||
fi
|
||||
fi
|
||||
Reference in New Issue
Block a user