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:
authornachoparker <nacho@ownyourbits.com>2018-09-10 05:51:53 +0300
committernacho <nacho@ownyourbits.com>2018-09-21 03:12:19 +0300
commit744342502b16d61dfb897d53ec0bd2887f0087da (patch)
tree7754c023432fe74882462ff4e577bb5e97a8cfad
parent41f21fad3767f805be6f9672394305ddd8204bff (diff)
docker: allow domains in command line, not only IPsv0.59.16
-rwxr-xr-xdocker-common/nextcloud/020nextcloud10
1 files changed, 2 insertions, 8 deletions
diff --git a/docker-common/nextcloud/020nextcloud b/docker-common/nextcloud/020nextcloud
index cb97b236..9de184f8 100755
--- a/docker-common/nextcloud/020nextcloud
+++ b/docker-common/nextcloud/020nextcloud
@@ -52,14 +52,8 @@ IP=$( ip a show dev "$IFACE" | grep global | grep -oP '\d{1,3}(.\d{1,3}){3}' | h
sudo -u www-data php "$OCC" config:system:set trusted_domains 1 --value="$IP"
# Trusted Domain ( as an argument )
-[[ "$@" != "" ]] && {
- IP=$( grep -oP '\d{1,3}(\.\d{1,3}){3}' <<< "$2" ) # validate that the first argument is a valid IP
- if [[ "$IP" != "" ]]; then
- sudo -u www-data php "$OCC" config:system:set trusted_domains 6 --value="$IP"
- else
- echo "First argument must be an IP address to include as a Trusted domain. Ignoring"
- fi
-}
+[[ "$@" != "" ]] && \
+ sudo -u www-data php "$OCC" config:system:set trusted_domains 6 --value="$@"
# Display NC logs in the docker logs
tail -f -n0 /data/app/data/nextcloud.log &