diff options
Diffstat (limited to 'etc/nextcloudpi-config.d/no-ip.sh')
-rw-r--r-- | etc/nextcloudpi-config.d/no-ip.sh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/etc/nextcloudpi-config.d/no-ip.sh b/etc/nextcloudpi-config.d/no-ip.sh index 08e948f2..118aeeb8 100644 --- a/etc/nextcloudpi-config.d/no-ip.sh +++ b/etc/nextcloudpi-config.d/no-ip.sh @@ -66,7 +66,9 @@ EOF configure() { - [[ $ACTIVE_ != "yes" ]] && { service noip2 stop; update-rc.d noip2 disable; return; } + [[ $ACTIVE_ != "yes" ]] && { service noip2 stop; update-rc.d noip2 disable; return 0; } + + ping -W 2 -w 1 -q github.com &>/dev/null || { echo "No internet connectivity"; return 1; } /usr/local/bin/noip2 -C -c /usr/local/etc/no-ip2.conf -U $TIME_ -u $USER_ -p $PASS_ || return 1 update-rc.d noip2 enable |