summaryrefslogtreecommitdiff
path: root/roles/apache_server/templates/deploy_static_site_certs
blob: 32ace4e933ed23243ff27405249d06a3558903c2 (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
#!/bin/sh

set -eu


domains()
{
    cd /etc/letsencrypt/static_sites
    ls
}


opts()
{
    for domain in $(domains)
    do
        echo -w "/srv/http/$domain" -d "$domain"
    done
}


certbot certonly \
        --noninteractive \
        --email "{{ letsencrypt_email }}" \
        --agree-tos \
        --expand \
        --webroot $(opts)