change host (#2131)

Signed-off-by: enoch85 <github@hanssonit.se>
This commit is contained in:
Daniel Hansson 2021-11-11 20:06:46 +01:00 committed by GitHub
parent 35e5dc733d
commit 574a3ff5f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions

3
lib.sh
View File

@ -41,8 +41,7 @@ IFACE=$(ip r | grep "default via" | awk '{print $5}')
IFACE2=$(ip -o link show | awk '{print $2,$9}' | grep 'UP' | cut -d ':' -f 1)
REPO=$(grep "^deb " /etc/apt/sources.list | grep http | awk '{print $2}' | head -1)
ADDRESS=$(hostname -I | cut -d ' ' -f 1)
# WANIP4=$(dig +short myip.opendns.com @resolver1.opendns.com) # as an alternative
WANIP4=$(curl -s -k -m 5 -4 icanhazip.com)
WANIP4=$(dig +short myip.opendns.com @resolver1.opendns.com)
INTERFACES="/etc/netplan/nextcloud.yaml"
GATEWAY=$(ip route | grep default | awk '{print $3}')
# Internet DNS required when a check needs to be made to a server outside the home/SME

View File

@ -171,7 +171,7 @@ cat << DDCLIENT_CONF > "/etc/ddclient.conf"
# Default system settings
use=if, if=$IFACE
use=web, web=$WANIP4
use=web, web=https://api.ipify.org
# DDNS-service specific setting
# Provider=$PROVIDER