File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed
Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -36,9 +36,9 @@ detect_endpoint () {
3636 if [[ $( curl -m 1 169.254.169.254 -sSfL & > /dev/null; echo $? ) -eq 0 ]]; then
3737 while [[ ! -s ${BASE_DIR} /.hal/public_endpoint ]]; do
3838 echo " Detected cloud metadata endpoint"
39- echo " Trying to determine public IP address (using 'dig +short myip.opendns. com @resolver1.opendns .com')"
39+ echo " Trying to determine public IP address (using 'dig +short TXT o-o.myaddr.l.google. com @ns1.google .com')"
4040 sleep 1
41- dig +short myip.opendns. com @resolver1.opendns .com | tee ${BASE_DIR} /.hal/public_endpoint
41+ dig +short TXT o-o.myaddr.l.google. com @ns1.google .com | sed ' s|"||g ' | tee ${BASE_DIR} /.hal/public_endpoint
4242 done
4343 else
4444 echo " No cloud metadata endpoint detected, detecting interface IP (and storing in ${BASE_DIR} /.hal/public_endpoint):"
Original file line number Diff line number Diff line change @@ -64,9 +64,9 @@ detect_endpoint () {
6464 if [[ $( curl -m 1 169.254.169.254 -sSfL & > /dev/null; echo $? ) -eq 0 ]]; then
6565 while [[ ! -s ${BASE_DIR} /.hal/public_endpoint ]]; do
6666 echo " Detected cloud metadata endpoint"
67- echo " Trying to determine public IP address (using 'dig +short myip.opendns. com @resolver1.opendns .com')"
67+ echo " Trying to determine public IP address (using 'dig +short TXT o-o.myaddr.l.google. com @ns1.google .com')"
6868 sleep 1
69- dig +short myip.opendns. com @resolver1.opendns .com | tee ${BASE_DIR} /.hal/public_endpoint
69+ dig +short TXT o-o.myaddr.l.google. com @ns1.google .com | sed ' s|"||g ' | tee ${BASE_DIR} /.hal/public_endpoint
7070 done
7171 else
7272 echo " No cloud metadata endpoint detected, detecting interface IP (and storing in ${BASE_DIR} /.hal/public_endpoint):"
Original file line number Diff line number Diff line change @@ -46,9 +46,9 @@ detect_endpoint () {
4646 > ${BASE_DIR} /.hal/public_endpoint
4747 while [[ ! -s ${BASE_DIR} /.hal/public_endpoint ]]; do
4848 echo " Detected cloud metadata endpoint"
49- echo " Trying to determine public IP address (using 'dig +short myip.opendns. com @resolver1.opendns .com')"
49+ echo " Trying to determine public IP address (using 'dig +short TXT o-o.myaddr.l.google. com @ns1.google .com')"
5050 sleep 1
51- dig +short myip.opendns. com @resolver1.opendns .com | tee ${BASE_DIR} /.hal/public_endpoint
51+ dig +short TXT o-o.myaddr.l.google. com @ns1.google .com | sed ' s|"||g ' | tee ${BASE_DIR} /.hal/public_endpoint
5252 done
5353 else
5454 echo " No cloud metadata endpoint detected, detecting interface IP (and storing in ${BASE_DIR} /.hal/public_endpoint):"
You can’t perform that action at this time.
0 commit comments