Skip to content

Instantly share code, notes, and snippets.

@danaketh
Created December 6, 2015 20:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danaketh/dc8ebb921d9b2720ab1d to your computer and use it in GitHub Desktop.
Save danaketh/dc8ebb921d9b2720ab1d to your computer and use it in GitHub Desktop.
Simple bash script I've made to make the Let's Encrypt faster to use...
#!/bin/bash
cmd="./letsencrypt-auto certonly --webroot -w"
if [ ! -z $1 ]
then
# CHANGE THIS!
source /path/to/configs/$1
cmd="$cmd $webroot"
for d in "${domains[@]}"
do
cmd="$cmd -d $d"
done
# CHANGE THIS!
cd /path/to/letsencrypt
sudo $cmd
else
echo "Config file required!"
fi
exit
webroot="/var/www/example.com"
domains[0]="example.com"
domains[1]="www.example.com"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment