|
@@ -1,4 +1,5 @@
|
1
|
1
|
#!/bin/bash
|
|
2
|
+set -o errexit
|
2
|
3
|
# Renew all live certificates with LetsEncrypt. This needs to run at least
|
3
|
4
|
# once every three months.
|
4
|
5
|
|
|
@@ -11,8 +12,8 @@ function getDomains() {
|
11
|
12
|
}
|
12
|
13
|
|
13
|
14
|
service apache2 stop
|
14
|
|
-for c in `ls /etc/letsencrypt/live`; do
|
15
|
|
- domains=$(getDomains /etc/letsencrypt/live/$c/cert.pem)
|
|
15
|
+for c in $(find /etc/letsencrypt/live/ -mindepth 1 -type d); do
|
|
16
|
+ domains=$(getDomains "$c"/cert.pem)
|
16
|
17
|
/root/letsencrypt/letsencrypt-auto --renew certonly -c /etc/letsencrypt/cli.conf --domains=$domains
|
17
|
18
|
done
|
18
|
19
|
service apache2 start
|