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:
authorNathan Acks <necopinus@users.noreply.github.com>2019-01-22 04:07:39 +0300
committernachoparker <nacho@ownyourbits.com>2019-01-22 04:07:39 +0300
commit0e062aa223a331d63775c7720be39058732d6641 (patch)
tree1db391559313788752eb511af54fcf21f11e6ecd
parent57728e2847c4f7ba089d63b5085372d791166c8f (diff)
dnsmasq: detect IP from config file (#782)v1.4.3
-rw-r--r--bin/ncp/NETWORKING/dnsmasq.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/ncp/NETWORKING/dnsmasq.sh b/bin/ncp/NETWORKING/dnsmasq.sh
index 6fb6f275..4ef1234e 100644
--- a/bin/ncp/NETWORKING/dnsmasq.sh
+++ b/bin/ncp/NETWORKING/dnsmasq.sh
@@ -49,7 +49,8 @@ configure()
}
local IFACE=$( ip r | grep "default via" | awk '{ print $5 }' | head -1 )
- local IP=$( ip a show dev "$IFACE" | grep global | grep -oP '\d{1,3}(.\d{1,3}){3}' | head -1 )
+ local IP=$( sudo -u www-data php /var/www/nextcloud/occ config:system:get trusted_domains 6 | grep -oP '\d{1,3}(.\d{1,3}){3}' )
+ [[ "$IP" == "" ]] && IP=$( ip a show dev "$IFACE" | grep global | grep -oP '\d{1,3}(.\d{1,3}){3}' | head -1 )
[[ "$IP" == "" ]] && { echo "could not detect IP"; return 1; }