Update nodemgmt-scripts.sh
This commit is contained in:
@@ -52,7 +52,8 @@ STATUS() {
|
|||||||
DIVIDER; echo -e "${idsST[Reset]}"
|
DIVIDER; echo -e "${idsST[Reset]}"
|
||||||
if [ ! -z ${LOCAL_SERVICES+x} ]; then
|
if [ ! -z ${LOCAL_SERVICES+x} ]; then
|
||||||
lip=$(/sbin/ip -o -4 addr list ens192 | awk '{print $4}' | cut -d/ -f1)
|
lip=$(/sbin/ip -o -4 addr list ens192 | awk '{print $4}' | cut -d/ -f1)
|
||||||
echo -e " ${idsST[Bold]}${idsCL[LightCyan]}${NODE_HOSTNAME} (${lip})${idsST[Reset]}${idsCL[LightCyan]} - localhost${idsCL[Default]}"
|
uptime=`uptime -p`
|
||||||
|
echo -e " ${idsST[Bold]}${idsCL[LightCyan]}${NODE_HOSTNAME} (${lip}) - ${uptime}${idsST[Reset]}${idsCL[LightCyan]} - localhost${idsCL[Default]}"
|
||||||
DIVIDER false green
|
DIVIDER false green
|
||||||
for srvc in "${LOCAL_SERVICES[@]}"
|
for srvc in "${LOCAL_SERVICES[@]}"
|
||||||
do
|
do
|
||||||
@@ -75,7 +76,8 @@ STATUS() {
|
|||||||
if [[ $(/sbin/ip -o -4 addr list ens192 | awk '{print $4}' | cut -d/ -f1) == *"${nip}"* ]]; then NCMD=''; LH='- localhost'
|
if [[ $(/sbin/ip -o -4 addr list ens192 | awk '{print $4}' | cut -d/ -f1) == *"${nip}"* ]]; then NCMD=''; LH='- localhost'
|
||||||
else NCMD="ssh root@${nip}"; LH=''
|
else NCMD="ssh root@${nip}"; LH=''
|
||||||
fi
|
fi
|
||||||
echo -e " ${idsST[Bold]}${idsCL[LightCyan]}iDS-Node${nid} (${nip})${idsST[Reset]}${idsCL[LightCyan]} ${LH}${idsCL[Default]}"
|
uptime=`${NCMD} uptime -p`
|
||||||
|
echo -e " ${idsST[Bold]}${idsCL[LightCyan]}iDS-Node${nid} (${nip}) - ${uptime}${idsST[Reset]}${idsCL[LightCyan]} ${LH}${idsCL[Default]}"
|
||||||
DIVIDER false green
|
DIVIDER false green
|
||||||
checkhost=$(CHECK_HOST ${nip})
|
checkhost=$(CHECK_HOST ${nip})
|
||||||
if [ "${checkhost}" != "false" ]; then
|
if [ "${checkhost}" != "false" ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user