diff options
-rw-r--r-- | changelog.md | 6 | ||||
-rw-r--r-- | ncp.sh | 8 | ||||
-rwxr-xr-x | update.sh | 15 |
3 files changed, 23 insertions, 6 deletions
diff --git a/changelog.md b/changelog.md index 815514e3..f15896dc 100644 --- a/changelog.md +++ b/changelog.md @@ -1,7 +1,9 @@ -[v0.57.4](https://github.com/nextcloud/nextcloudpi/commit/c00fbce) (2018-06-18) letsencrypt: install from debian package +[v0.57.5](https://github.com/nextcloud/nextcloudpi/commit/444e762) (2018-06-18) fix nextcloud-domain running before default GW is ready -[v0.57.3](https://github.com/nextcloud/nextcloudpi/commit/a74248b) (2018-06-18) armbian: default to SSH disabled +[v0.57.4](https://github.com/nextcloud/nextcloudpi/commit/ce2d38c) (2018-06-18) letsencrypt: install from debian package + +[v0.57.3 ](https://github.com/nextcloud/nextcloudpi/commit/a74248b) (2018-06-18) armbian: default to SSH disabled [v0.57.2 ](https://github.com/nextcloud/nextcloudpi/commit/5479305) (2018-06-18) nc-static-IP: autodetect default interface @@ -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 @@ -227,6 +227,21 @@ EOF apt-get install -y --no-install-recommends letsencrypt } + # fix nextcloud-domain running before default GW is ready + pkill -f nextcloud-domain + cat > /usr/local/bin/nextcloud-domain.sh <<'EOF' +#!/bin/bash +# wicd service finishes before completing DHCP +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 +done +cd /var/www/nextcloud +sudo -u www-data php occ config:system:set trusted_domains 1 --value=$IP +EOF + } # end - only live updates exit 0 |