blob: b0227e88ad753753d2200ef605a5310ea4c33899 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#!/bin/sh
set -eu
domains()
{
cd /etc/letsencrypt/static_sites
ls
}
opts()
{
domains | while read domain alias
do
echo -w "/srv/letsencrypt/$domain" -d "$domain"
if [ -n "$alias" ]
then
echo -d "$alias"
fi
done
}
certbot certonly \
--noninteractive \
--email "{{ letsencrypt_email }}" \
--agree-tos \
--expand \
--cert-name static_sites \
--webroot $(opts)
|