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