mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
change how whitelist script determines if wazuh is enabled
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
{%- set MASTERIP = salt['pillar.get']('static:masterip', '') %}
|
{%- set MASTERIP = salt['pillar.get']('static:masterip', '') %}
|
||||||
|
{%- set WAZUH_ENABLED = salt['pillar.get']('static:wazuh', '0') %}
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
# Copyright 2014,2015,2016,2017,2018,2019,2020 Security Onion Solutions, LLC
|
||||||
@@ -17,7 +18,7 @@
|
|||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
# Check if Wazuh enabled
|
# Check if Wazuh enabled
|
||||||
if grep -q -R "wazuh: 1" /opt/so/saltstack/pillar/*; then
|
if [ {{ WAZUH_ENABLED }} ]; then
|
||||||
WAZUH_MGR_CFG="/opt/so/wazuh/etc/ossec.conf"
|
WAZUH_MGR_CFG="/opt/so/wazuh/etc/ossec.conf"
|
||||||
if ! grep -q "<white_list>{{ MASTERIP }}</white_list>" $WAZUH_MGR_CFG ; then
|
if ! grep -q "<white_list>{{ MASTERIP }}</white_list>" $WAZUH_MGR_CFG ; then
|
||||||
DATE=`date`
|
DATE=`date`
|
||||||
|
|||||||
Reference in New Issue
Block a user