This commit is contained in:
2025-03-10 18:48:28 -05:00
parent 6bfc699004
commit 5acf9e6c78
2 changed files with 5 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env bash
VERS='5.4.1a-03102025'
VERS='5.4.1b-03102025'
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 offsite-staticroute-fix '

View File

@@ -13,8 +13,10 @@ SINGLE_SERVER_SERVICE_CHECK(){
if [[ $(ip addr show $(ip route | awk '/default/ { print $5 }') | grep "inet" | awk '/inet/ {print $2}' | cut -d'/' -f1) == *${NM_SINGLESRVR_IP[${1^^}]}* ]]; then
# if [ ! -f ${NM_TMPFOLDER}/.singleserver.${1^^}.primary ] || [ $(expr $(date +%s) - $(stat -c %Y ${NM_TMPFOLDER}/.singleserver.${1^^}.primary)) -ge 300 ]; then
# if [ ! -f ${NM_TMPFOLDER}/.singleserver.${1^^}.primary ]; then
[ ! -f ${NM_TMPFOLDER}/.singleserver.${1^^}.primary ] && touch ${NM_TMPFOLDER}/.singleserver.${1^^}.primary
SENDNOTICE "'${NM_NODETYPES[${1^^}]}' Node Switch" "Starting SingleServer for '${NM_NODETYPES[${1^^}]}' on ${NM_HOSTNAMES[${RUN_NODE_IP}]} (${RUN_NODE_IP}), stopping on other Nodes"
if [ ! -f ${NM_TMPFOLDER}/.singleserver.${1^^}.primary ]; then
touch ${NM_TMPFOLDER}/.singleserver.${1^^}.primary
SENDNOTICE "'${NM_NODETYPES[${1^^}]}' Node Switch" "Starting SingleServer for '${NM_NODETYPES[${1^^}]}' on ${NM_HOSTNAMES[${RUN_NODE_IP}]} (${RUN_NODE_IP}), stopping on other Nodes"
fi
echo "$(date +%Y-%m-%d-%H-%M-%S) - ${NM_HOSTNAMES[${RUN_NODE_IP}]} - Starting SingleServer for '${NM_NODETYPES[${1^^}]}' on ${NM_HOSTNAMES[${RUN_NODE_IP}]} (${RUN_NODE_IP}), stopping on the other Nodes ..." >> ${NM_LOGFILE}
for stc in "${!servicestocheck}"; do
[ "${stc}" = "pdnsadmin" ] && stc="pdnsadmin.service pdnsadmin.socket"