mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-02-08 06:48:00 +00:00
address review
Signed-off-by: Simon L <szaimen@e.mail.de>
This commit is contained in:
parent
cac797114a
commit
a56fbb6045
5 changed files with 25 additions and 13 deletions
|
|
@ -8,12 +8,13 @@ done
|
|||
|
||||
set -x
|
||||
IPv4_ADDRESS_NC="$(dig nextcloud-aio-nextcloud IN A +short | grep '^[0-9.]\+$' | sort | head -n1)"
|
||||
sed -i "s|NC_IPV4_PLACEHOLDER|$IPv4_ADDRESS_NC|g"
|
||||
sed -i "s# || { src NC_IPV4_PLACEHOLDER }##g" /conf/haproxy.cfg
|
||||
HAPROXYFILE="$(sed "s|NC_IPV4_PLACEHOLDER|$IPv4_ADDRESS_NC|" /haproxy.cfg)"
|
||||
echo "$HAPROXYFILE" > /tmp/haproxy.cfg
|
||||
|
||||
IPv6_ADDRESS_NC="$(dig nextcloud-aio-nextcloud AAAA +short | grep '^[0-9a-f:]\+$' | sort | head -n1)"
|
||||
sed -i "s|NC_IPV6_PLACEHOLDER|$IPv6_ADDRESS_NC|g"
|
||||
sed -i "s# || { src NC_IPV6_PLACEHOLDER }##g" /conf/haproxy.cfg
|
||||
HAPROXYFILE="$(sed "s# || { src NC_IPV6_PLACEHOLDER }##g" /tmp/haproxy.cfg)"
|
||||
HAPROXYFILE="$(echo "$HAPROXYFILE" | sed "s|NC_IPV6_PLACEHOLDER|$IPv6_ADDRESS_NC|")"
|
||||
echo "$HAPROXYFILE" > /tmp/haproxy.cfg
|
||||
set +x
|
||||
|
||||
haproxy -f /conf/haproxy.cfg -db
|
||||
haproxy -f /tmp/haproxy.cfg -db
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue