Update status.inc
This commit is contained in:
@@ -223,7 +223,8 @@ STATUS(){
|
||||
# SENDNOTICE "${NM_HOSTNAMES[${nip}]}[${nip}]" "${NM_SERVICE_DESC[${srvc}]} is down" 1
|
||||
echo "$(date) - ${nip} - ${NM_HOSTNAMES[${nip}]}[${nip}] - ${NM_SERVICE_DESC[${srvc}]} is down" >> ${NM_LOGFILE}
|
||||
[ "${srvc}" == "pdnsadmin" ] && ${NCMD} systemctl restart ${srvc} &
|
||||
else
|
||||
|
||||
elif [ ! -f ${NM_TMPFOLDER}/${nip}~${srvc}.disable ]; then
|
||||
errtime=`date +%s`-$(stat -c %Y ${NM_TMPFOLDER}/${nip}~${srvc}.down)
|
||||
if [ $errtime -gt ${RENOTIFY_TIMEOUT} ]; then
|
||||
[ ! -f ${NM_TMPFOLDER}/${nip}~${srvc}.errtime ] && mv ${NM_TMPFOLDER}/${nip}~${srvc}.down ${NM_TMPFOLDER}/${nip}~${srvc}.errtime
|
||||
|
||||
Reference in New Issue
Block a user