- #!/bin/bash
- _LOGDIFF=600
- _LOGDIR="/root/.wine/drive_c/services/analis/log"
- _LOGFILE=$( ls -t -d -1 ${_LOGDIR}/Analis* | head -1 )
- if [[ $[ $(date +%s) - $(stat -c %Y ${_LOGFILE}) ] -gt ${_LOGDIFF} ]]; then
- echo $(date)" The difference between system time and latest modified file in logdir is "$[ $(date +%s) - $(stat -c %Y ${_LOGFILE}) ]" The service seems to be unhealty." >> ${_LOGDIR}/healthcheck.log
- exit 1
- fi
|