update
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
VERS='4.15.27-11252023'
|
VERS='4.15.28-11252023'
|
||||||
|
|
||||||
noheader=' service status-check nightlyrephp7.3-fpm,new backup report check checkcerts gitea update-nodes copynpmcerts singleservercheck update-dyndns backup-offsitepfsense gui nightlyreview update log '
|
noheader=' service status-check nightlyrephp7.3-fpm,new backup report check checkcerts gitea update-nodes copynpmcerts singleservercheck update-dyndns backup-offsitepfsense gui nightlyreview update log '
|
||||||
CERT_DAEMON='/snap/bin/certbot'
|
CERT_DAEMON='/snap/bin/certbot'
|
||||||
|
|||||||
@@ -163,8 +163,7 @@ STATUS(){
|
|||||||
fi
|
fi
|
||||||
if [ "${NCMD}" != "" ]; then
|
if [ "${NCMD}" != "" ]; then
|
||||||
checkhost=$(CHECK_HOST ${nip})
|
checkhost=$(CHECK_HOST ${nip})
|
||||||
[ "${checkhost}" != "false" ] && checkhostssl=$(ssh -o BatchMode=yes -o ConnectTimeout=3 root@${nip} echo ok 3>&1) || checkhostssl=''
|
[ "${checkhost}" != "false" ] && checkhostssl=$(ssh -o BatchMode=yes -o ConnectTimeout=3 root@${nip} echo ok 3>&1)
|
||||||
echo "HERE: $checkhost - $checkhostssl"
|
|
||||||
else
|
else
|
||||||
checkhost=true
|
checkhost=true
|
||||||
checkhostssl=ok
|
checkhostssl=ok
|
||||||
@@ -447,7 +446,7 @@ STATUS(){
|
|||||||
fi
|
fi
|
||||||
if [ "${ST_ACTION}" != "check" ]; then
|
if [ "${ST_ACTION}" != "check" ]; then
|
||||||
toterrtime=`date +%s`-$(stat -c %Y ${NM_TMPFOLDER}/${nip}.errtime)
|
toterrtime=`date +%s`-$(stat -c %Y ${NM_TMPFOLDER}/${nip}.errtime)
|
||||||
if [ "${checkhostssl}" != "" ]; then
|
if [ "${checkhost}" != "false" ]; then
|
||||||
echo -e "${idsCL[Red]} - Node is online, but SSL is down!${idsCL[Default]}"
|
echo -e "${idsCL[Red]} - Node is online, but SSL is down!${idsCL[Default]}"
|
||||||
|
|
||||||
else
|
else
|
||||||
@@ -460,20 +459,20 @@ STATUS(){
|
|||||||
toterrtime=`date +%s`-$(stat -c %Y ${NM_TMPFOLDER}/${nip}.errtime)
|
toterrtime=`date +%s`-$(stat -c %Y ${NM_TMPFOLDER}/${nip}.errtime)
|
||||||
errtime=`date +%s`-$(stat -c %Y ${NM_TMPFOLDER}/${nip}.down)
|
errtime=`date +%s`-$(stat -c %Y ${NM_TMPFOLDER}/${nip}.down)
|
||||||
if [ "${ST_ACTION}" != "check" ]; then
|
if [ "${ST_ACTION}" != "check" ]; then
|
||||||
if [ "${checkhostssl}" != "" ]; then
|
if [ "${checkhost}" != "false" ]; then
|
||||||
echo -e "${idsCL[Red]} - Node SSL has been down for $(SHOW_TIME ${toterrtime}) ${idsCL[LightYello]}${LH}${idsCL[Default]}"
|
echo -e "${idsCL[Red]} - Node SSL has been down for $(SHOW_TIME ${toterrtime}) ${idsCL[LightYello]}${LH}${idsCL[Default]}"
|
||||||
else
|
else
|
||||||
echo -e "${idsCL[Red]} - Node has been down for $(SHOW_TIME ${toterrtime}) ${idsCL[LightYello]}${LH}${idsCL[Default]}"
|
echo -e "${idsCL[Red]} - Node has been down for $(SHOW_TIME ${toterrtime}) ${idsCL[LightYello]}${LH}${idsCL[Default]}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [ $errtime -gt ${NM_RENOTIFY_TIMEOUT} ]; then
|
if [ $errtime -gt ${NM_RENOTIFY_TIMEOUT} ]; then
|
||||||
if [ "${checkhostssl}" != "" ]; then
|
if [ "${checkhost}" != "false" ]; then
|
||||||
SENDNOTICE "${NM_HOSTNAMES[${nip}]}[${nip}]" "${NM_HOSTNAMES[${nip}]}[${nip}] SSL has been down for $(SHOW_TIME ${toterrtime})" 1
|
SENDNOTICE "${NM_HOSTNAMES[${nip}]}[${nip}]" "${NM_HOSTNAMES[${nip}]}[${nip}] SSL has been down for $(SHOW_TIME ${toterrtime})" 1
|
||||||
else
|
else
|
||||||
SENDNOTICE "${NM_HOSTNAMES[${nip}]}[${nip}]" "${NM_HOSTNAMES[${nip}]}[${nip}] has been down for $(SHOW_TIME ${toterrtime})" 1
|
SENDNOTICE "${NM_HOSTNAMES[${nip}]}[${nip}]" "${NM_HOSTNAMES[${nip}]}[${nip}] has been down for $(SHOW_TIME ${toterrtime})" 1
|
||||||
fi
|
fi
|
||||||
elif [ $errtime -gt 60 ] && [ $errtime -lt 180 ] && [ ! -f ${NM_TMPFOLDER}/${nip}.errtime ]; then
|
elif [ $errtime -gt 60 ] && [ $errtime -lt 180 ] && [ ! -f ${NM_TMPFOLDER}/${nip}.errtime ]; then
|
||||||
if [ "${checkhostssl}" != "" ]; then
|
if [ "${checkhost}" != "false" ]; then
|
||||||
SENDNOTICE "${NM_HOSTNAMES[${nip}]}[${nip}]" "${NM_HOSTNAMES[${nip}]}[${nip}] is online, but SSL is down" 1
|
SENDNOTICE "${NM_HOSTNAMES[${nip}]}[${nip}]" "${NM_HOSTNAMES[${nip}]}[${nip}] is online, but SSL is down" 1
|
||||||
else
|
else
|
||||||
SENDNOTICE "${NM_HOSTNAMES[${nip}]}[${nip}]" "${NM_HOSTNAMES[${nip}]}[${nip}] is down" 1
|
SENDNOTICE "${NM_HOSTNAMES[${nip}]}[${nip}]" "${NM_HOSTNAMES[${nip}]}[${nip}] is down" 1
|
||||||
|
|||||||
Reference in New Issue
Block a user