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