touch file at start of highstate, just kill salt dont systemctl stop it https://github.com/Security-Onion-Solutions/securityonion/issues/1831

This commit is contained in:
m0duspwnens
2020-11-13 19:34:17 -05:00
parent b210092534
commit e958246457
3 changed files with 6 additions and 4 deletions

View File

@@ -92,9 +92,7 @@ if [ $CURRENT_TIME -ge $((SYSTEM_START_TIME+$UPTIME_REQ)) ]; then
log "last highstate completed at `date -d @$LAST_HIGHSTATE_END`" I
log "checking if any jobs are running" I
logCmd "salt-call --local saltutil.running" I
log "stopping salt-minion service" I
logCmd "timeout -k10 -s9 120 systemctl stop salt-minion" I
log "killing any leftover salt-minion processes" I
log "killing all salt-minion processes" I
logCmd "pkill -9 -ef /usr/bin/salt-minion" I
log "starting salt-minion service" I
logCmd "systemctl start salt-minion" I

View File

@@ -1,3 +1,6 @@
include:
- salt.minion-state-apply-test
state-apply-test:
schedule.present:
- name: salt-minion-state-apply-test

View File

@@ -1,3 +1,4 @@
minion-state-apply-test:
file.touch:
- name: /opt/so/log/salt/state-apply-test
- name: /opt/so/log/salt/state-apply-test
- order: first