Skip to content

Commit 6717156

Browse files
author
Justin Lee
committed
chore(minnaker): Switch to google dns instead of opendns
1 parent bf29883 commit 6717156

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

scripts/functions.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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):"

scripts/operator_install.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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):"

scripts/refresh_endpoint.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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):"

0 commit comments

Comments
 (0)