From 919d7b64f267c21abc1f69ccf9bdb7e6824b6add Mon Sep 17 00:00:00 2001 From: David Kerkeslager Date: Mon, 1 Aug 2016 21:55:51 -0400 Subject: [PATCH] Add a script that automates setup of a letsencrypt cert --- autoserver/autocert.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 autoserver/autocert.sh diff --git a/autoserver/autocert.sh b/autoserver/autocert.sh new file mode 100644 index 0000000..3e6747c --- /dev/null +++ b/autoserver/autocert.sh @@ -0,0 +1,12 @@ +# Add the jessie-backports source to apt +echo 'deb http://ftp.debian.org/debian jessie-backports main' | sudo tee -a /etc/apt/sources.list +sudo apt-get update + +# Install certbot +sudo apt-get -y install certbot -t jessie-backports + +# Generate cert +sudo certbot certonly --webroot -w /var/www/site -d kerkeslager.com -d www.kerkeslager.com + +# Restart nginx +sudo service nginx restart -- 2.20.1