This commit is contained in:
2023-12-06 19:05:53 -06:00
parent a34ac85f42
commit 60be208262
2 changed files with 25 additions and 31 deletions

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env bash
VERS='5.1.14-12062023'
VERS='5.1.15-12062023'
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 '

View File

@@ -21,8 +21,9 @@ STATUS(){
## REPLICATION CHECK SETUP
############################
[ ! -f ${NM_TMPFOLDER}/.replcheck ] || [ $(expr $(date +%s) - $(stat -c %Y ${NM_TMPFOLDER}/.replcheck)) -ge 300 ] && REPLRUN=1 || REPLRUN=0
# if [ "${ST_ACTION}" == "report" ] || [ "${ST_ACTION}" == "repl" ] || [ "${ST_ACTION}" == "check" ] || [ "${ST_ACTION}" == "" ]; then
if [ "${ST_ACTION}" == "repl" ] || [ "${ST_ACTION}" == "all" ]; then
if [ "${ST_ACTION}" == "repl" ] || [ "${ST_ACTION}" == "all" ] || [ ${REPLRUN} -eq 1 ]; then
if [ "${ST_ACTION}" != "check" ]; then
echo -en "${idsCL[LightCyan]}Setting up replication checks ... ${idsCL[Default]}"
fi
@@ -139,7 +140,7 @@ STATUS(){
########################
# if [ "${ST_ACTION}" == "report" ] || [ "${ST_ACTION}" == "repl" ] || [ "${ST_ACTION}" == "check" ] || [ "${ST_ACTION}" == "" ]; then
if [ "${ST_ACTION}" == "repl" ] || [ "${ST_ACTION}" == "all" ]; then
if [ "${ST_ACTION}" == "repl" ] || [ "${ST_ACTION}" == "all" ] || [ ${REPLRUN} -eq 1 ]; then
if [ "${ST_ACTION}" != "check" ]; then
echo -e "${idsST[Bold]}"; DIVIDER
echo -e "${idsCL[Yellow]} Replication Status Between the Primary and Secondary Nodes${idsCL[Default]}"
@@ -245,14 +246,7 @@ It was down for $(SHOW_TIME $(expr $(date +%s) - $(stat -c %Y ${NM_TMPFOLDER}/${
##########################
# REMOVE REPL CHECK FILES
##########################
# if [ "${ST_ACTION}" == "report" ] || [ "${ST_ACTION}" == "repl" ] || [ "${ST_ACTION}" == "check" ] || [ "${ST_ACTION}" == "" ]; then
if [ "${ST_ACTION}" == "repl" ] || [ "${ST_ACTION}" == "all" ]; then
if [ "${ST_ACTION}" != "check" ]; then
echo -en "${idsCL[LightCyan]} Cleaning up status checks... ${idsCL[Default]}"
fi
#NHCMD="ssh root@${NM_HOSTS['MYSQL'][0]}"
#LBHCMD="ssh root@${NM_HOSTS['LB'][0]}"
#WHCMD="ssh root@${NM_HOSTS['WEB'][0]}"
[ "${ST_ACTION}" != "check" ] && echo -en "${idsCL[LightCyan]} Cleaning up status checks... ${idsCL[Default]}"
for NTYPE in "${ntypesel[@]}"; do
PH=${NTYPE}_HOSTS[0]
if [ ! -f ${NM_FOLDER}/${!PH}.down ]; then
@@ -272,9 +266,9 @@ It was down for $(SHOW_TIME $(expr $(date +%s) - $(stat -c %Y ${NM_TMPFOLDER}/${
fi
done
rm -f ${NM_FOLDER}/test.${STATUS_START//-/}.repl
touch ${NM_TMPFOLDER}/.replcheck
[ "${ST_ACTION}" != "check" ] && echo -e "${idsCL[LightGreen]}Complete${idsCL[Default]}\n"
fi
fi
########################
## FREE SPACE CHECK