From 97eef3c510b87ccd3111979b9668e66d67b82713 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Wed, 8 Nov 2023 23:38:23 -0600 Subject: [PATCH] Update status.inc --- inc/status.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/inc/status.inc b/inc/status.inc index 78c5a489..a3c3e474 100755 --- a/inc/status.inc +++ b/inc/status.inc @@ -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