m0duspwnens
2020-11-05 17:51:51 -05:00
parent 8da070d511
commit 1a75ebdca3
3 changed files with 6 additions and 1 deletions

View File

@@ -24,7 +24,7 @@ fi
# Constants
SYSTEM_START_TIME=$(date -d "$(</proc/uptime awk '{print $1}') seconds ago" +%s)
LAST_HIGHSTATE_END=$(date -r /opt/so/log/salt/lasthighstate +%s) # file populated by salt.lasthighstate state at end of successful highstate run
LAST_HIGHSTATE_END=$([ -f "/opt/so/log/salt/lasthighstate" ] && date -r /opt/so/log/salt/lasthighstate +%s || echo 0) # file populated by salt.lasthighstate state at end of successful highstate run
HIGHSTATE_RUNNING=$(salt-call --local saltutil.running --out=json | jq -r '.local[].fun' | grep -q 'state.highstate' && echo $?)
ERROR_STRING="ERROR"
SUCCESS_STRING="OK"

View File

@@ -0,0 +1,4 @@
lasthighstate:
file.touch:
- name: /opt/so/log/salt/lasthighstate
- order: last

View File

@@ -35,6 +35,7 @@ base:
- common
- patch.os.schedule
- motd
- salt.lasthighstate
'*_helix and G@saltversion:{{saltversion}}':
- match: compound