Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/nextcloudpi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'etc/nextcloudpi-config.d/letsencrypt.sh')
-rw-r--r--etc/nextcloudpi-config.d/letsencrypt.sh2
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