Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/nextcloudpi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'bin/nextcloud-domain.sh')
-rw-r--r--bin/nextcloud-domain.sh7
1 files changed, 3 insertions, 4 deletions
diff --git a/bin/nextcloud-domain.sh b/bin/nextcloud-domain.sh
index 39556889..f15c7a39 100644
--- a/bin/nextcloud-domain.sh
+++ b/bin/nextcloud-domain.sh
@@ -4,13 +4,12 @@ source /usr/local/etc/library.sh
# wicd service finishes before completing DHCP
while :; do
- iface="$( ip r | grep "default via" | awk '{ print $5 }' | head -1 )"
- ip="$( ip a show dev "$iface" | grep global | grep -oP '\d{1,3}(.\d{1,3}){3}' | head -1 )"
+ ip="$(get_ip)"
+ public_ip="$(curl -m4 icanhazip.com 2>/dev/null)"
- public_ip="$(curl icanhazip.com 2>/dev/null)"
[[ "$public_ip" != "" ]] && ncc config:system:set trusted_domains 11 --value="$public_ip"
-
[[ "$ip" != "" ]] && break
+
sleep 3
done