mirror of
https://github.com/IgorKha/wireguard-mikrotik.git
synced 2025-07-24 04:44:38 +02:00
Fixes #5: The command 'dig' has been replaced with the built-in 'host'
This commit is contained in:
parent
76c374e9b3
commit
c590161380
1 changed files with 1 additions and 1 deletions
|
@ -101,7 +101,7 @@ function installQuestions() {
|
|||
echo ""
|
||||
|
||||
# Detect public IPv4 or IPv6 address and pre-fill for the user
|
||||
SERVER_PUB_IP=$(dig +short myip.opendns.com @resolver1.opendns.com)
|
||||
SERVER_PUB_IP=$(host myip.opendns.com resolver1.opendns.com | grep -oP 'has address \K[0-9.]+')
|
||||
if [[ -z ${SERVER_PUB_IP} ]]; then
|
||||
# Detect public IPv6 address
|
||||
SERVER_PUB_IP=$(ip -6 addr | sed -ne 's|^.* inet6 \([^/]*\)/.* scope global.*$|\1|p' | head -1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue