diff options
Diffstat (limited to 'ncp.sh')
-rw-r--r-- | ncp.sh | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -163,12 +163,12 @@ EOF cat > /usr/local/bin/nextcloud-domain.sh <<'EOF' #!/bin/bash -IFACE=$( ip r | grep "default via" | awk '{ print $5 }' | head -1 ) -IP=$( ip a show dev "$IFACE" | grep global | grep -oP '\d{1,3}(.\d{1,3}){3}' | head -1 ) # wicd service finishes before completing DHCP -while [[ "$IP" == "" ]]; do +while :; do + IFACE="$( ip r | grep "default via" | awk '{ print $5 }' | head -1 )" + IP="$( ip a show dev "$IFACE" | grep global | grep -oP '\d{1,3}(.\d{1,3}){3}' | head -1 )" + [[ "$IP" != "" ]] && break sleep 3 - IP=$( ip a show dev "$IFACE" | grep global | 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 |