This commit is contained in:
2024-02-28 22:15:31 -06:00
parent b5781550ac
commit b27d089ffd
2 changed files with 28 additions and 15 deletions

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
VERS='5.1.91-02202024' VERS='5.1.92-02282024'
NM_BETA=false NM_BETA=false
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 betacheck ' 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 betacheck '

View File

@@ -243,6 +243,8 @@ STATUS(){
checked=good checked=good
elif [ -f ${STATUSRUN_TMPFOLDER}/repl.${rcheck}.${nip}.timeout ]; then elif [ -f ${STATUSRUN_TMPFOLDER}/repl.${rcheck}.${nip}.timeout ]; then
checked=timeout checked=timeout
elif [ -f ${STATUSRUN_TMPFOLDER}/repl.${rcheck}.${nip}.skip ]; then
checked=skip
fi fi
if [ $(($(date +%s)-scanstart)) -gt 600 ]; then if [ $(($(date +%s)-scanstart)) -gt 600 ]; then
SENDNOTICE "NMG Scan Stuck" "NMG REPL check has been running for 10mins, klling all bash...." 1 SENDNOTICE "NMG Scan Stuck" "NMG REPL check has been running for 10mins, klling all bash...." 1
@@ -278,6 +280,10 @@ It was down for $(SHOW_TIME $(expr $(date +%s) - $(stat -c %Y ${NM_TMPFOLDER}/${
rm -f ${NM_TMPFOLDER}/${nip}~${rcheck}.repl* rm -f ${NM_TMPFOLDER}/${nip}~${rcheck}.repl*
fi fi
ssh -q -o ConnectTimeout=3 -o ConnectionAttempts=1 root@${nip} 'find ${NM_REPL_CHECK_LOC[${rcheck}]} -iname "*.sync-conflict-*" -exec rm {} \;' & ssh -q -o ConnectTimeout=3 -o ConnectionAttempts=1 root@${nip} 'find ${NM_REPL_CHECK_LOC[${rcheck}]} -iname "*.sync-conflict-*" -exec rm {} \;' &
elif [ "${checked}" == "skip" ]; then
[ "${STATUS_ACTION}" != "check" ] && echo -e "${idsCL[LightCyan]}Skipped${idsCL[Default]}"
fi fi
done done
@@ -820,6 +826,10 @@ REPLCHECK(){
timeout=`date --date='1 minutes' +%s` timeout=`date --date='1 minutes' +%s`
# timeout=`date --date='30 seconds' +%s` # timeout=`date --date='30 seconds' +%s`
if [ "${nip}" == "10.2.1.5" ] && [ "${rcheck}" == "pdns" ]; then
rm -f ${STATUSRUN_TMPFOLDER}/repl.${rcheck}.${nip}.running
touch ${STATUSRUN_TMPFOLDER}/repl.${rcheck}.${nip}.skip
else
checked=false checked=false
until [ "${checked}" == "" ]; do until [ "${checked}" == "" ]; do
if [ "${PH_CMD}" == "" ]; then if [ "${PH_CMD}" == "" ]; then
@@ -834,6 +844,9 @@ REPLCHECK(){
done done
rm -f ${STATUSRUN_TMPFOLDER}/repl.${rcheck}.${nip}.running rm -f ${STATUSRUN_TMPFOLDER}/repl.${rcheck}.${nip}.running
[ "${timeout}" == "true" ] && touch ${STATUSRUN_TMPFOLDER}/repl.${rcheck}.${nip}.timeout || touch ${STATUSRUN_TMPFOLDER}/repl.${rcheck}.${nip}.good [ "${timeout}" == "true" ] && touch ${STATUSRUN_TMPFOLDER}/repl.${rcheck}.${nip}.timeout || touch ${STATUSRUN_TMPFOLDER}/repl.${rcheck}.${nip}.good
fi
} }
REPLSTART(){ REPLSTART(){