summaryrefslogtreecommitdiffstats
path: root/configserver/src/main/sh/ping-configserver
blob: b14fc22a9ae3383ad2834fbf57523eacb3ca882d (plain) (blame)
1
2
3
4
5
6
7
8
9
#!/bin/sh
host=$1
port=$2
curl -s -S -m 5 http://$host:$port/state/v1/health | grep "status\": {\"code\": \"up\"}"
if [ $? -gt 0 ]; then
    exit 1
else
    exit 0
fi