diff options
author | nachoparker <nacho@ownyourbits.com> | 2017-08-31 07:12:22 +0300 |
---|---|---|
committer | nachoparker <nacho@ownyourbits.com> | 2017-08-31 07:12:33 +0300 |
commit | a86efea78ebc241ce51db3cd4d747a744558e51e (patch) | |
tree | aa9568b341940df475a807d4a2fe4ad2cf2d4a87 /etc/nextcloudpi-config.d/letsencrypt.sh | |
parent | 2c911be3611d5011c4f8e0d09c21706e259a6a45 (diff) |
various extras: check internet connectivityv0.24.10
Diffstat (limited to 'etc/nextcloudpi-config.d/letsencrypt.sh')
-rw-r--r-- | etc/nextcloudpi-config.d/letsencrypt.sh | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/etc/nextcloudpi-config.d/letsencrypt.sh b/etc/nextcloudpi-config.d/letsencrypt.sh index 980d34f9..8ca0f82c 100644 --- a/etc/nextcloudpi-config.d/letsencrypt.sh +++ b/etc/nextcloudpi-config.d/letsencrypt.sh @@ -44,6 +44,8 @@ Your certificate will be automatically renewed every month # tested with git version v0.11.0-71-g018a304 configure() { + ping -W 2 -w 1 -q github.com &>/dev/null || { echo "No internet connectivity"; return 1; } + grep -q ServerName $VHOSTCFG && \ sed -i "s|ServerName .*|ServerName $DOMAIN_|" $VHOSTCFG || \ sed -i "/DocumentRoot/aServerName $DOMAIN_" $VHOSTCFG |