mirror of
https://github.com/vdsm/virtual-dsm.git
synced 2025-02-24 13:30:02 +08:00
Check IP/Port
This commit is contained in:
parent
7855512414
commit
0cd215f962
10
run/check.sh
10
run/check.sh
@ -21,6 +21,11 @@ rest=${rest#*:}
|
|||||||
rest=${rest%%,*}
|
rest=${rest%%,*}
|
||||||
PORT=${rest%%\"*}
|
PORT=${rest%%\"*}
|
||||||
|
|
||||||
|
if [ -z "${PORT}" ]; then
|
||||||
|
echo "Guest has not set a portnumber yet.."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# Retrieve the IP address
|
# Retrieve the IP address
|
||||||
|
|
||||||
if [[ ! "${RESPONSE}" =~ "eth0" ]] ; then
|
if [[ ! "${RESPONSE}" =~ "eth0" ]] ; then
|
||||||
@ -34,6 +39,11 @@ rest=${rest#*:}
|
|||||||
rest=${rest#*\"}
|
rest=${rest#*\"}
|
||||||
IP=${rest%%\"*}
|
IP=${rest%%\"*}
|
||||||
|
|
||||||
|
if [ -z "${IP}" ]; then
|
||||||
|
echo "Guest has not received an IP yet.."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
if ! curl -m 3 -ILfSs "http://${IP}:${PORT}/" > /dev/null; then
|
if ! curl -m 3 -ILfSs "http://${IP}:${PORT}/" > /dev/null; then
|
||||||
echo "Failed to reach ${IP}:${PORT}"
|
echo "Failed to reach ${IP}:${PORT}"
|
||||||
exit 1
|
exit 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user