16 lines
360 B
Bash
16 lines
360 B
Bash
|
|
#!/bin/bash
|
||
|
|
# Usage: ionu-isup.sh {webapp} {host} [{port}]
|
||
|
|
# e.g. ionu-isup.sh cgws https://prod1.ionu.com 443
|
||
|
|
# This just set and exit status for use by LB, etc.
|
||
|
|
|
||
|
|
APP=$1
|
||
|
|
URL=http://$2
|
||
|
|
if [ "$3" != "" ]; then
|
||
|
|
URL=${URL}:${3}
|
||
|
|
fi
|
||
|
|
URL="${URL}/${APP}/status.jsp?isUP"
|
||
|
|
#echo "URL: ${URL}"
|
||
|
|
wget -q -O - "${URL}" | grep -q '"status": true'
|
||
|
|
STATUS=$?
|
||
|
|
exit ${STATUS}
|