Skip to content

Commit

Permalink
fix nextcloud-domain service with ipv6
Browse files Browse the repository at this point in the history
  • Loading branch information
nachoparker committed Aug 30, 2017
1 parent a8cfd17 commit 9e212e6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docker/run-nc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ cd /var/www/nextcloud/

# Trusted Domain ( as an argument )
[[ "$@" != "" ]] && {
IP=$( grep -oP '\d{1,3}(.\d{1,3}){3}' <<< "$1" ) # validate that the first argument is a valid IP
IP=$( grep -oP '\d{1,3}(\.\d{1,3}){3}' <<< "$1" ) # validate that the first argument is a valid IP
if [[ "$IP" != "" ]]; then
sudo -u www-data php occ config:system:set trusted_domains 1 --value=$IP
else
Expand Down
2 changes: 1 addition & 1 deletion nextcloudpi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ IP=$( ip a | grep "global $IFACE" | grep -oP '\d{1,3}(.\d{1,3}){3}' | head -1 )
# wicd service finishes before completing DHCP
while [[ "$IP" == "" ]]; do
sleep 3
IP=$( ip a | grep "global $IFACE" | grep -oP '\d{1,3}(.\d{1,3}){3}' | head -1 )
IP=$( ip a | grep "global $IFACE" | grep -oP '\d{1,3}(\.\d{1,3}){3}' | head -1 )
done
cd /var/www/nextcloud
sudo -u www-data php occ config:system:set trusted_domains 1 --value=$IP
Expand Down

0 comments on commit 9e212e6

Please sign in to comment.