Update nodemgmt-scripts.sh
This commit is contained in:
@@ -415,8 +415,10 @@ STATUS(){
|
||||
echo -e " ${idsCL[LightCyan]}${NM_NODETYPES[$NTYPE]}-Node1 (${!PH}) <--> ${idsST[Bold]}${NM_NODETYPES[$NTYPE]}-Node${nid} (${nip})${idsST[Reset]}${idsCL[Default]}"
|
||||
DIVIDER false green
|
||||
fi
|
||||
checkhost=$(CHECK_HOST ${nip})
|
||||
if [ "${checkhost}" != "false" ]; then
|
||||
|
||||
# checkhost=$(CHECK_HOST ${nip})
|
||||
#if [ "${checkhost}" != "false" ]; then
|
||||
if [ ! -f ${FOLDER}/${!PH}.down ] || [ ! -f ${FOLDER}/${nip}.down ]; then
|
||||
if [ -f ${FOLDER}/${nip}.down ]; then
|
||||
if [ -f ${FOLDER}/${nip}.errtime ]; then
|
||||
toterrtime=`date +%s`-$(stat -c %Y ${FOLDER}/${nip}.errtime)
|
||||
@@ -434,7 +436,6 @@ STATUS(){
|
||||
if [ "${ST_ACTION}" != "check" ]; then
|
||||
if [ "${ST_ACTION}" != "report" ]; then
|
||||
c=0; cw=30; spc=''
|
||||
echo "${cw}-${#REPL_DESC[${rcheck}]}"
|
||||
spc1=${cw}-${#REPL_DESC[${rcheck}]}
|
||||
until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
|
||||
else
|
||||
@@ -493,10 +494,8 @@ STATUS(){
|
||||
done
|
||||
else
|
||||
if [ "${ST_ACTION}" != "check" ]; then
|
||||
echo -e "${idsCL[Red]}Node is Down!${idsCL[Default]}"
|
||||
fi
|
||||
if [ ! -f ${FOLDER}/${nip}.down ]; then
|
||||
touch ${FOLDER}/${nip}.down
|
||||
[ ! -f ${FOLDER}/${!PH}.down ] && echo -e "${idsCL[Red]}${NM_NODETYPES[$NTYPE]}-Node1 (${!PH}) is offline${idsCL[Default]}"
|
||||
[ ! -f ${FOLDER}/${nip}.down ] && echo -e "${idsCL[Red]}${NM_NODETYPES[$NTYPE]}-Node${nip: -1} (${nip}) is offline${idsCL[Default]}"
|
||||
fi
|
||||
fi
|
||||
if [ "${ST_ACTION}" != "check" ]; then echo; fi
|
||||
|
||||
Reference in New Issue
Block a user