mirror of
https://github.com/vdsm/virtual-dsm.git
synced 2025-06-08 01:18:32 +08:00
Connect to second NIC in DHCP mode
This commit is contained in:
parent
e804a8aa37
commit
17965153ec
14
run/check.sh
14
run/check.sh
@ -3,16 +3,16 @@ set -u
|
|||||||
|
|
||||||
# Docker Healthcheck
|
# Docker Healthcheck
|
||||||
|
|
||||||
PORT=5000
|
: ${DHCP:='N'}
|
||||||
FILE="/var/dsm.ip"
|
|
||||||
|
|
||||||
if [ ! -f "${FILE}" ]; then
|
if [ "$DHCP" = "Y" ]; then
|
||||||
echo "IP not assigned"
|
PORT=5555
|
||||||
exit 1
|
IP="127.0.0.1"
|
||||||
|
else
|
||||||
|
PORT=5000
|
||||||
|
IP="20.20.20.21"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
IP=$(cat "${FILE}")
|
|
||||||
|
|
||||||
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