diff options
author | Daniel Hansson <daniel@techandme.se> | 2017-03-12 02:53:18 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-12 02:53:18 +0300 |
commit | ad6086affa1abd1c909504fbe1739da00cea5f9c (patch) | |
tree | ec6f461e46baeb69c3df3544c11e3f05626ebaa6 /lets-encrypt | |
parent | 95bf13b830ccb6b3843f4a12e2cf67ab7b97624a (diff) |
cleanup11.0.2-v2
Diffstat (limited to 'lets-encrypt')
-rw-r--r-- | lets-encrypt/activate-ssl.sh | 34 |
1 files changed, 25 insertions, 9 deletions
diff --git a/lets-encrypt/activate-ssl.sh b/lets-encrypt/activate-ssl.sh index d5f4fa05..9551fd95 100644 --- a/lets-encrypt/activate-ssl.sh +++ b/lets-encrypt/activate-ssl.sh @@ -5,9 +5,7 @@ NCPATH=/var/www/nextcloud WANIP4=$(dig +short myip.opendns.com @resolver1.opendns.com) ADDRESS=$(hostname -I | cut -d ' ' -f 1) -dir_before_letsencrypt=/etc -letsencryptpath=$dir_before_letsencrypt/letsencrypt -certfiles=$letsencryptpath/live +certfiles=/etc/letsencrypt/live SCRIPTS=/var/scripts # Check if root @@ -287,10 +285,13 @@ fi a2dissite 000-default.conf sudo service apache2 stop # Generate certs -letsencrypt certonly --standalone --rsa-key-size 4096 -d $domain +letsencrypt certonly \ +--standalone \ +--rsa-key-size 4096 \ +--renew-by-default \ +--agree-tos \ +-d $domain -# Use for testing -#letsencrypt --apache --server https://acme-staging.api.letsencrypt.org/directory -d EXAMPLE.COM # Activate Apache again (Disabled during standalone) service apache2 start a2ensite 000-default.conf @@ -310,7 +311,11 @@ else fi ##### START SECOND TRY # Generate certs -letsencrypt --rsa-key-size 4096 -d $domain +letsencrypt \ +--rsa-key-size 4096 \ +--renew-by-default \ +--agree-tos \ +-d $domain # Check if $certfiles exists if [ -d "$certfiles" ] then @@ -325,7 +330,12 @@ else echo -e "\e[0m" fi ##### START THIRD TRY -letsencrypt certonly --agree-tos --webroot -w $NCPATH --rsa-key-size 4096 -d $domain +letsencrypt certonly \ +--webroot --w $NCPATH \ +--rsa-key-size 4096 \ +--renew-by-default \ +--agree-tos \ +-d $domain # Check if $certfiles exists if [ -d "$certfiles" ] @@ -342,7 +352,13 @@ else fi #### START FORTH TRY # Generate certs -letsencrypt --agree-tos --apache --rsa-key-size 4096 -d $domain +letsencrypt \ +--apache +--rsa-key-size 4096 \ +--renew-by-default \ +--agree-tos \ +-d $domain + # Check if $certfiles exists if [ -d "$certfiles" ] then |