This commit is contained in:
2023-08-26 15:37:56 -05:00
parent bddf82aced
commit 22e7b41f60
2 changed files with 26 additions and 2 deletions

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env bash
VERS='4.11.12-08262023'
VERS='4.11.13-08262023'
noheader=' service status-check nightlyrephp7.3-fpm,new backup report check checkcerts gitea update-nodes copynpmcerts singleservercheck update-dyndns backup-offsitepfsense '
CERT_DAEMON='/snap/bin/certbot'

View File

@@ -212,7 +212,7 @@ SERVICE(){
if [ "${1}" = "nginx" ] && ([ "${3}" == "" ] || [ "${3}" == "all" ]); then
[ "${RUN_NODE_TYPE}" != "" ] && [ "${NM_REPL_NGINX_PATHS[${RUN_NODE_TYPE}]}" != "" ] &&
# [ "${RUN_NODE_TYPE}" != "" ] && [ "${NM_REPL_NGINX_PATHS[${RUN_NODE_TYPE}]}" != "" ] &&
if [ "${2}" = "restart" ] || [ "${2}" = "reload" ]; then
if [ "${3}" != "ns" ]; then
@@ -238,6 +238,30 @@ SERVICE(){
${PH_CMD} rm -f ${NM_REPL_NGINX_PATHS[${RUN_NODE_TYPE}]}/test.repl
fi
fi
if [ "${1}" = "pdns" ] && ([ "${3}" == "" ] || [ "${3}" == "all" ]); then
if [ "${2}" = "restart" ] || [ "${2}" = "reload" ]; then
if [ "${3}" != "ns" ]; then
if [ "${3}" != "q" ]; then
echo -en "${idsCL[LightYellow]}Verifying replication across the nodes... ${idsCL[Default]}"
fi
if [[ "${RUN_NODE_IP}" == *"${!NT_HOST}"* ]]; then
PH_CMD=""
else
PH_CMD="ssh root@${!NT_HOST}"
fi
${PH_CMD} touch /etc/powerdns/test.repl
for nip in "${!NT_HOSTS}"; do
checkhost=$(CHECK_HOST ${nip})
if [ "${checkhost}" != "false" ] && [ "${nip}" != "${!NT_HOST}" ]; then
checked=false
until [ "${checked}" = "true" ]; do
checked="`${PH_CMD} ssh root@${nip} [ -f /etc/powerdns/test.repl ] && [ $(expr $(date +%s) - $(stat -L --format %Y /etc/powerdns/test.repl)) -le 90 ] && echo true`"
done
fi
done
${PH_CMD} rm -f /etc/powerdns/test.repl
fi
fi
elif [ "${1}" = "apache2-x" ]; then
if [ "${2}" = "restart" ] || [ "${2}" = "reload" ]; then