refactor
This commit is contained in:
9
deploy/bin/update-resolv
Executable file
9
deploy/bin/update-resolv
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
# modify /etc/resolv.conf
|
||||
registryIP=$(nslookup -type=A api-registry. | awk '/^Name:/ {c=2;N=$2} !--c {print N,$2}' | awk '{printf "%s", $2}')
|
||||
resolvFile=$(cat /etc/resolv.conf)
|
||||
|
||||
echo -e "nameserver $registryIP" >>/etc/resolv.conf
|
||||
# echo "$registryIP registry.service.ego.io" >> /etc/hosts # Add consul host with static IP (consul register itself as 127.0.0.1)
|
||||
# nslookup api-registry
|
||||
Reference in New Issue
Block a user