diff options
author | nachoparker <nacho@ownyourbits.com> | 2017-08-09 00:18:09 +0300 |
---|---|---|
committer | nachoparker <nacho@ownyourbits.com> | 2017-08-11 00:17:56 +0300 |
commit | a6b79b433f3bd99196b0360c167d5ec9bf6af3d6 (patch) | |
tree | c791950bf03e41cfb8dda622f04df6afe39982b3 /etc/nextcloudpi-config.d/letsencrypt.sh | |
parent | f248c0fc096ad2e0c9b5bb2e3e7bc8d99512cb4f (diff) |
fix web update to NC12.0.1v0.19.1
Diffstat (limited to 'etc/nextcloudpi-config.d/letsencrypt.sh')
-rw-r--r-- | etc/nextcloudpi-config.d/letsencrypt.sh | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/etc/nextcloudpi-config.d/letsencrypt.sh b/etc/nextcloudpi-config.d/letsencrypt.sh index 815d6095..403c6770 100644 --- a/etc/nextcloudpi-config.d/letsencrypt.sh +++ b/etc/nextcloudpi-config.d/letsencrypt.sh @@ -55,15 +55,17 @@ configure() sed -i "s|SSLCertificateFile.*|SSLCertificateFile /etc/letsencrypt/live/$DOMAIN_/fullchain.pem|" $VHOSTCFG2 sed -i "s|SSLCertificateKeyFile.*|SSLCertificateKeyFile /etc/letsencrypt/live/$DOMAIN_/privkey.pem|" $VHOSTCFG2 - /etc/letsencrypt/letsencrypt-auto certonly -n --no-self-upgrade --webroot -w $NCDIR --hsts --agree-tos -m $EMAIL_ -d $DOMAIN_ || return 1 - echo "* 1 * * 1 root /etc/letsencrypt/certbot-auto renew --quiet" > /etc/cron.d/letsencrypt-ncp + /etc/letsencrypt/letsencrypt-auto certonly -n --no-self-upgrade --webroot -w $NCDIR --hsts --agree-tos -m $EMAIL_ -d $DOMAIN_ && { + echo "* 1 * * 1 root /etc/letsencrypt/certbot-auto renew --quiet" > /etc/cron.d/letsencrypt-ncp - cd /var/www/nextcloud - sudo -u www-data php occ config:system:set trusted_domains 4 --value=$DOMAIN_ - sudo -u www-data php occ config:system:set overwrite.cli.url --value=https://$DOMAIN_ + cd /var/www/nextcloud + sudo -u www-data php occ config:system:set trusted_domains 4 --value=$DOMAIN_ + sudo -u www-data php occ config:system:set overwrite.cli.url --value=https://$DOMAIN_ - # delayed in bg so it does not kill the connection, and we get AJAX response - ( sleep 2 && systemctl restart apache2 ) &>/dev/null & + # delayed in bg so it does not kill the connection, and we get AJAX response + ( sleep 2 && systemctl restart apache2 ) &>/dev/null & + } + rm -rf $NCDIR/.well-known } cleanup() |