Merge "Move consul config from shared NFS to configmap"
[oom.git] / kubernetes / consul / resources / config / consul-agent-config / scripts / sparky-be-script.sh
1
2 NAME=$(/consul/bin/kubectl -n {{ .Values.nsPrefix }} get pod | grep -o "aai-sparky-be[^[:space:]]*")
3
4 if [ -n "$NAME" ]; then
5    if /consul/bin/kubectl -n {{ .Values.nsPrefix }} exec -it $NAME -- ps -efww | grep 'java' | grep 'sparky' > /dev/null; then
6
7       echo Success. UI Backend Service process is running. 2>&1
8       exit 0
9    else
10       echo Failed. UI Backend Service process is not running. 2>&1
11       exit 1
12    fi
13 else
14    echo Failed. UI Backend Service container is offline. 2>&1
15    exit 1
16 fi