Update run.sh

This commit is contained in:
2019-01-29 20:07:00 -06:00
parent 1894aabbfc
commit 9702cf77ec

35
run.sh
View File

@@ -7,23 +7,24 @@ source /opt/idssys/nodemgmt/settings.conf
source /opt/idssys/nodemgmt/defaults.inc
if [ "$1" != "service" ] && [ "$1" != "status" ] && [ "$1" != "status-check" ]; then
echo ""
echo -e "${idsCL[Yellow]} NodeMgmt - Galera/NGINX Node Management${idsCL[Default]} ${idsCL[DarkGray]}(ver-${VERS})${idsCL[Default]}"
echo -e "${idsCL[Yellow]}-------------------------------------------------------------${idsCL[Default]}"
echo -e "Node hostname: ${idsST[Bold]}${idsCL[LightCyan]}${NODE_HOSTNAME}${idsCL[Default]}${idsST[Reset]}"
for srvc in "${NODE_SERVICES[@]}"
do
if [ "${NM_SERVICES[${srvc}]}" = "" ]; then NM_SERVICES[${srvc}]="${srvc}"; fi
echo -en "${NM_SERVICES[${srvc}]} "
if [ $(pgrep ${srvc} | wc -l) -gt "0" ]; then
echo -e "${idsCL[Green]}Running${idsCL[Default]}"
else echo -e "${idsCL[Red]}Not Running${idsCL[Default]}"
fi
done
echo -e "${idsCL[Yellow]}-------------------------------------------------------------${idsCL[Default]}"
echo ""
if [ "$1" != "service" ] && [ "$1" != "status-check" ]; then
if [ "$1" != "status" ]; then
echo ""
echo -e "${idsCL[Yellow]} NodeMgmt - Galera/NGINX Node Management${idsCL[Default]} ${idsCL[DarkGray]}(ver-${VERS})${idsCL[Default]}"
echo -e "${idsCL[Yellow]}-------------------------------------------------------------${idsCL[Default]}"
echo -e "Node hostname: ${idsST[Bold]}${idsCL[LightCyan]}${NODE_HOSTNAME}${idsCL[Default]}${idsST[Reset]}"
for srvc in "${NODE_SERVICES[@]}"
do
if [ "${NM_SERVICES[${srvc}]}" = "" ]; then NM_SERVICES[${srvc}]="${srvc}"; fi
echo -en "${NM_SERVICES[${srvc}]} "
if [ $(pgrep ${srvc} | wc -l) -gt "0" ]; then
echo -e "${idsCL[Green]}Running${idsCL[Default]}"
else echo -e "${idsCL[Red]}Not Running${idsCL[Default]}"
fi
done
echo -e "${idsCL[Yellow]}-------------------------------------------------------------${idsCL[Default]}"
echo ""
fi
if [ "$1" != "" ]; then
echo -en "${idsCL[LightCyan]}Checking for updates...${idsCL[Default]}"
echo ""