forked from pierreprinetti/certbot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.sh
More file actions
22 lines (14 loc) · 845 Bytes
/
Copy pathrun.sh
File metadata and controls
22 lines (14 loc) · 845 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env bash
if [ -z ${renew+x} ]; then
if [ -z ${email+x} ]; then echo "Fatal: administrator email address must be specified with the environment variable named 'email'"; exit 1; fi
if [ -z ${domains+x} ]; then echo "Fatal: domains must be specified with the environment variable named 'domains'"; exit 1; fi
#if [ -z ${agree_tos+x} ]; then echo "Fatal: agree to the TOS setting the environment variable named 'agree_tos'"; exit 1; fi
if [ -z ${distinct+x} ]; then
certbot certonly --verbose --noninteractive --quiet --standalone --agree-tos --email="${email}" -d "${domains}"; else
IFS=',' read -ra ADDR <<< "$domains"
for domain in "${ADDR[@]}"; do
certbot certonly --verbose --noninteractive --quiet --standalone --agree-tos --email="${email}" -d "${domain}"
done
fi; else
certbot renew
fi