update references of /opt/so/saltstack to /opt/so/saltstack/default. use var default_salt_dir where appropriate - https://github.com/Security-Onion-Solutions/securityonion-saltstack/issues/749

This commit is contained in:
m0duspwnens
2020-05-21 10:54:47 -04:00
parent 9aff026569
commit d0242c1da6
23 changed files with 120 additions and 98 deletions

View File

@@ -1,13 +1,13 @@
#!/usr/bin/env bash
# This script adds ip addresses to specific rule sets defined by the user
default_salt_dir=/opt/so/saltstack/default
POLICY=$1
IPADDRESS=$2
if grep -q $2 "/opt/so/saltstack/pillar/firewall/$1.sls"; then
if grep -q $2 "$default_salt_dir/pillar/firewall/$1.sls"; then
echo "Firewall Rule Already There"
else
echo " - $2" >> /opt/so/saltstack/pillar/firewall/$1.sls
echo " - $2" >> $default_salt_dir/pillar/firewall/$1.sls
salt-call state.apply firewall queue=True
fi