mirror of
https://github.com/nextcloud/nextcloudpi.git
synced 2026-01-10 15:12:01 -03:30
library.sh: Fix broken detection of domain resolution errors
This commit is contained in:
parent
a97397102a
commit
df0caa2b84
@ -158,8 +158,8 @@ function set-nc-domain()
|
||||
ncc config:system:set trusted_proxies 11 --value="127.0.0.1"
|
||||
ncc config:system:set trusted_proxies 12 --value="::1"
|
||||
# ncc config:system:set trusted_proxies 13 --value="${domain}"
|
||||
local domain_ip="$(dig +short "${domain}")"
|
||||
[[ -z "$domain_ip" ]] || ncc config:system:set trusted_proxies 14 --value="$(dig +short "${domain}")"
|
||||
local domain_ip="$(dig +short "${domain}" 2>/dev/null)"
|
||||
! [[ "$domain_ip" =~ ^[0-9.]*$ ]] || ncc config:system:set trusted_proxies 14 --value="$(dig +short "${domain}")"
|
||||
sleep 5 # this seems to be required in the VM for some reason. We get `http2 error: protocol error` after ncp-upgrade-nc
|
||||
for try in {1..5}
|
||||
do
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user