Merge pull request #9317 from Security-Onion-Solutions/config

Reduce cron noise; ensure filecheck is restarted if modified
This commit is contained in:
Jason Ertel
2022-12-07 08:41:04 -05:00
committed by GitHub
2 changed files with 10 additions and 2 deletions

View File

@@ -88,7 +88,7 @@ socusersroles:
salt-relay:
cron.present:
- name: 'ps -ef | grep salt-relay | grep -v grep || /opt/so/saltstack/default/salt/soc/files/bin/salt-relay.sh >> /opt/so/log/soc/salt-relay.log 2>&1 &'
- name: 'pgrep -f "/opt/so/saltstack/default/salt/soc/files/bin/salt-relay.sh" &> /dev/null || /opt/so/saltstack/default/salt/soc/files/bin/salt-relay.sh >> /opt/so/log/soc/salt-relay.log 2>&1 &'
so-soc:
docker_container.running:

View File

@@ -144,9 +144,17 @@ filecheck_script:
- group: 939
- mode: 755
filecheck_restart:
cmd.run:
- name: pkill -f "python3 /opt/so/conf/strelka/filecheck"
- hide_output: True
- success_retcodes: [0,1]
- onchanges:
- file: filecheck_script
filecheck_run:
cron.present:
- name: 'ps -ef | grep filecheck | grep -v grep || python3 /opt/so/conf/strelka/filecheck >> /opt/so/log/strelka/filecheck_stdout.log 2>&1 &'
- name: 'pgrep -f "python3 /opt/so/conf/strelka/filecheck" &> /dev/null >> /opt/so/log/strelka/filecheck_stdout.log 2>&1 &'
- user: {{ filecheck_runas }}
filcheck_history_clean: