Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # specify the location of Let's Encrypt tool
- # and its parameters
- certbot='/usr/bin/certbot --agree-tos --email my@email.com --apache --redirect --expand --renew-by-default -n '
- # put the list of the domains in this file
- vhost=( `cat "domain-list.txt" `)
- # loop variables
- ssl_exec="${certbot}"
- n=1
- #################### START ##########################
- for t in "${vhost[@]}"
- do
- ssl_exec="${ssl_exec} -d $t "
- let "n++"
- # every 100th domain,
- # create a SSL certificate for these 100 domains
- # (SAN = Subject Alternative Name certificate)
- if (( n == 100 )); then
- $ssl_exec
- # echo $ssl_exec
- # reset the loop variables
- ssl_exec="${certbot}"
- n=1
- fi
- done
- # create SSl certificate for the rest of the domains
- $ssl_exec
- # echo $ssl_exec
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement