Update services.inc

This commit is contained in:
2025-01-12 18:57:32 -06:00
parent c16f2737f2
commit d95ddd3671

View File

@@ -11,7 +11,7 @@ SINGLE_SERVER_SERVICE_CHECK(){
if [ ! -f ${NM_TMPFOLDER}/.skip ] && ([[ "$(declare -p ${1^^}_SINGLESRVR_SERVICES)" =~ "declare -a" ]] || [[ "$(declare -p ${1^^}_SINGLESRVR_DOCKERS)" =~ "declare -a" ]]); 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 900 ]; 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
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"