Advertisement
Guest User

Untitled

a guest
Sep 30th, 2016
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.42 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. APACHE_SSL_PATH=/etc/apache2/ssl
  4. letsencrypt/letsencrypt-auto certonly -c letsencrypt/cli.ini --webroot -w $2 -d $1 -d www.$1
  5. ret=$?
  6. if [ $ret == 0 ]; then
  7.         cp $APACHE_SSL_PATH/$1.pem $APACHE_SSL_PATH/$1.pem.old
  8.         cat /etc/letsencrypt/live/$1/privkey.pem > $APACHE_SSL_PATH/$1.pem
  9.         cat /etc/letsencrypt/live/$1/fullchain.pem >> $APACHE_SSL_PATH/$1.pem
  10.         service apache2 reload
  11. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement