Update status.inc

This commit is contained in:
2023-11-08 23:38:23 -06:00
parent a8c02558aa
commit 97eef3c510

View File

@@ -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