diff options
-rw-r--r-- | nextcloudpi.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/nextcloudpi.sh b/nextcloudpi.sh index 4147ac84..1460eb66 100644 --- a/nextcloudpi.sh +++ b/nextcloudpi.sh @@ -68,6 +68,11 @@ EOF #!/bin/bash IFACE=$( ip r | grep "default via" | awk '{ print $5 }' ) 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 ) +done cd /var/www/nextcloud sudo -u www-data php occ config:system:set trusted_domains 1 --value=$IP EOF |