update
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
VERS='5.4.1a-03102025'
|
VERS='5.4.1b-03102025'
|
||||||
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 offsite-staticroute-fix '
|
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 '
|
||||||
|
|||||||
@@ -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 [[ $(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 ] || [ $(expr $(date +%s) - $(stat -c %Y ${NM_TMPFOLDER}/.singleserver.${1^^}.primary)) -ge 300 ]; then
|
||||||
# if [ ! -f ${NM_TMPFOLDER}/.singleserver.${1^^}.primary ]; then
|
# if [ ! -f ${NM_TMPFOLDER}/.singleserver.${1^^}.primary ]; then
|
||||||
[ ! -f ${NM_TMPFOLDER}/.singleserver.${1^^}.primary ] && touch ${NM_TMPFOLDER}/.singleserver.${1^^}.primary
|
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"
|
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}
|
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
|
for stc in "${!servicestocheck}"; do
|
||||||
[ "${stc}" = "pdnsadmin" ] && stc="pdnsadmin.service pdnsadmin.socket"
|
[ "${stc}" = "pdnsadmin" ] && stc="pdnsadmin.service pdnsadmin.socket"
|
||||||
|
|||||||
Reference in New Issue
Block a user