Update nodemgmt-scripts.sh

This commit is contained in:
2021-06-27 20:40:51 -05:00
parent da258d31b8
commit be3833bce0

View File

@@ -156,9 +156,11 @@ STATUS(){
fi
var2=${NTYPE}_SERVICES_CHECK[@]
for srvc in "${!var2}"; do
NOGOCHK=true
if [ "${nip}" = "10.5.10.122" ] && [ ${srvc} = "gitea" ] && [ ! -f ${FOLDER}/10.5.10.121.down ]; then
NOGOCHK=false
NOGOCHK=true;
if ${srvc} = "gitea" ]; then
if [[ $($NCMD /sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1) != *10.5.10.120* ]]; then
NOGOCHK=false;
fi
fi
if [ ${NOGOCHK} = true ]; then
if [ "${ST_ACTION}" != "check" ]; then
@@ -1428,14 +1430,14 @@ SERVICE(){
NCMD="ssh root@${nip}"
fi
GO=true;
NOGOCHK=true;
if [ "${1}" == "gitea" ]; then
if [[ $($NCMD /sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1) != *10.5.10.120* ]]; then
GO=false;
NOGOCHK=false;
fi
fi
if [ "${GO}" == "true" ]; then
if [ "${NOGOCHK}" == "true" ]; then
if [ "${3}" != "q" ]; then
echo -en "${NM_SRVCOPTS[${2}]}ing on ${NM_NODETYPES[$NTYPE]}-Node${nid} ($nip)... ${idsCL[Default]}"
fi