Update nodemgmt-scripts.sh
This commit is contained in:
@@ -50,9 +50,12 @@ STATUS() {
|
||||
spc1=${cw}-${#NM_SERVICES[${srvc}]}
|
||||
until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
|
||||
echo -en " ${NM_SERVICES[${srvc}]}$spc: "
|
||||
if [ $(pgrep ${srvc} | wc -l) -gt "0" ]; then
|
||||
if [ $(pgrep ${srvc} | wc -l) -lt "1" ]; then
|
||||
echo -e "${idsCL[Red]}Not Running${idsCL[Default]}"
|
||||
touch ${FOLDER}/localhost-${srvc}.down
|
||||
elif [ -f ${FOLDER}/localhost-${srvc}.down ]; then
|
||||
echo -e "${idsCL[Green]}Running${idsCL[Default]}"
|
||||
else echo -e "${idsCL[Red]}Not Running${idsCL[Default]}"
|
||||
rm -f ${FOLDER}/localhost-${srvc}.down
|
||||
fi
|
||||
done
|
||||
echo
|
||||
@@ -71,9 +74,12 @@ STATUS() {
|
||||
spc1=${cw}-${#NM_SERVICES[${srvc}]}
|
||||
until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
|
||||
echo -en " ${NM_SERVICES[${srvc}]}$spc: "
|
||||
if [ $(${NCMD} pgrep ${srvc} | wc -l) -gt "0" ]; then
|
||||
if [ $(${NCMD} pgrep ${srvc} | wc -l) -lt "1" ]; then
|
||||
echo -e "${idsCL[Red]}Not Running${idsCL[Default]}"
|
||||
touch ${FOLDER}/${nip}-${srvc}.down
|
||||
elif [ -f ${FOLDER}/${nip}-${srvc}.down ]; then
|
||||
echo -e "${idsCL[Green]}Running${idsCL[Default]}"
|
||||
else echo -e "${idsCL[Red]}Not Running${idsCL[Default]}"
|
||||
rm -f ${FOLDER}/${nip}-${srvc}.down
|
||||
fi
|
||||
done
|
||||
echo
|
||||
|
||||
Reference in New Issue
Block a user