From 744342502b16d61dfb897d53ec0bd2887f0087da Mon Sep 17 00:00:00 2001 From: nachoparker Date: Sun, 9 Sep 2018 20:51:53 -0600 Subject: docker: allow domains in command line, not only IPs --- docker-common/nextcloud/020nextcloud | 10 ++-------- 1 file 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 & -- cgit v1.2.3