Update nodemgmt-scripts.sh

This commit is contained in:
2021-06-27 19:43:11 -05:00
parent 644dcbc2c0
commit eb94fb1f6f

View File

@@ -1427,6 +1427,15 @@ SERVICE(){
else else
NCMD="ssh root@${nip}" NCMD="ssh root@${nip}"
fi fi
$GO=true;
if [ "${2}" = "gitea" ]; then
if [[ $($NCMD /sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1) != *10.5.10.120* ]]; then
$GO=false;
fi
fi
if [ "${GO}" == "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
@@ -1447,6 +1456,7 @@ SERVICE(){
elif [ "${3}" != "q" ]; then elif [ "${3}" != "q" ]; then
echo -e "${idsCL[Red]}Node is Down${idsCL[Default]}" echo -e "${idsCL[Red]}Node is Down${idsCL[Default]}"
fi fi
fi
# fi # fi
nid=`expr $nid + 1` nid=`expr $nid + 1`
# if [ "${1}" = "gitea" ]; then # if [ "${1}" = "gitea" ]; then