mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-20 06:26:57 +00:00
fix getting ip-address of talk and apache
Signed-off-by: Simon L <szaimen@e.mail.de>
This commit is contained in:
parent
87cc69ccd8
commit
5b49ec6da2
3 changed files with 5 additions and 3 deletions
|
|
@ -18,7 +18,7 @@ while ! nc -z "$NEXTCLOUD_HOST" 9000; do
|
|||
done
|
||||
|
||||
# Get ipv4-address of Apache
|
||||
IPv4_ADDRESS="$(dig nextcloud-aio-apache A +short +search | head -1)"
|
||||
IPv4_ADDRESS="$(dig "$APACHE_HOST" A +short +search | head -1)"
|
||||
# Bring it in CIDR notation
|
||||
# shellcheck disable=SC2001
|
||||
IPv4_ADDRESS="$(echo "$IPv4_ADDRESS" | sed 's|[0-9]\+$|1/32|')"
|
||||
|
|
|
|||
|
|
@ -20,8 +20,8 @@ fi
|
|||
|
||||
set -x
|
||||
IPv4_ADDRESS_TALK_RELAY="$(hostname -i | grep -oP '[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+' | head -1)"
|
||||
IPv4_ADDRESS_TALK="$(dig nextcloud-aio-talk IN A +short +search | grep '^[0-9.]\+$' | sort | head -n1)"
|
||||
IPv6_ADDRESS_TALK="$(dig nextcloud-aio-talk AAAA +short +search | grep '^[0-9a-f:]\+$' | sort | head -n1)"
|
||||
IPv4_ADDRESS_TALK="$(dig "$TALK_HOST" IN A +short +search | grep '^[0-9.]\+$' | sort | head -n1)"
|
||||
IPv6_ADDRESS_TALK="$(dig "$TALK_HOST" AAAA +short +search | grep '^[0-9a-f:]\+$' | sort | head -n1)"
|
||||
set +x
|
||||
|
||||
if [ -n "$IPv4_ADDRESS_TALK" ] && [ "$IPv4_ADDRESS_TALK_RELAY" = "$IPv4_ADDRESS_TALK" ]; then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue