Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- APACHE_SSL_PATH=/etc/apache2/ssl
- letsencrypt/letsencrypt-auto certonly -c letsencrypt/cli.ini --webroot -w $2 -d $1 -d www.$1
- ret=$?
- if [ $ret == 0 ]; then
- cp $APACHE_SSL_PATH/$1.pem $APACHE_SSL_PATH/$1.pem.old
- cat /etc/letsencrypt/live/$1/privkey.pem > $APACHE_SSL_PATH/$1.pem
- cat /etc/letsencrypt/live/$1/fullchain.pem >> $APACHE_SSL_PATH/$1.pem
- service apache2 reload
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement