This commit is contained in:
2019-01-29 19:39:55 -06:00
parent 55c92f9618
commit 613c4662f8
3 changed files with 18 additions and 41 deletions

12
run.sh
View File

@@ -14,16 +14,8 @@ if [ "$1" != "service" ] && [ "$1" != "status" ] && [ "$1" != "status-check" ];
echo -e "Node hostname: ${NODE_HOSTNAME}"
for srvc in "${NODE_SERVICES[@]}"
do
if [ "${srvc}" = "mysql" ]; then SER='MySQL: '
elif [ "${srvc}" = "nginx" ]; then SER='NGINX: '
elif [ "${srvc}" = "gogs" ]; then SER='Gogs: '
elif [ "${srvc}" = "gitea" ]; then SER='Gitea: '
elif [ "${srvc}" = "haproxy" ]; then SER='HAProxy:'
elif [ "${srvc}" = "keepalived" ]; then SER='Keepalived:'
elif [ "${srvc}" = "maxscale" ]; then SER='MaxScale:'
else SER="${2}"
fi
echo -en "${SER} "
if [ "${idsNMservices[${srvc}]}" = "" ]; then idsNMservices[${srvc}]="${srvc}"; fi
echo -en "${idsNMservices[${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]}"