Browse Source

Don't stop Apache until we have to; start it again right after.

Carl Meyer 8 years ago
parent
commit
0abf92734e
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      roles/common/files/letsencrypt-gencert

+ 2
- 1
roles/common/files/letsencrypt-gencert View File

1
 #!/bin/bash
1
 #!/bin/bash
2
-service apache2 stop
3
 d="$1"
2
 d="$1"
4
 for i in www mail autoconfig read news cloud git; do
3
 for i in www mail autoconfig read news cloud git; do
5
   if (getent hosts $i.$1 > /dev/null); then
4
   if (getent hosts $i.$1 > /dev/null); then
6
     d="$d,$i.$1";
5
     d="$d,$i.$1";
7
   fi
6
   fi
8
 done
7
 done
8
+service apache2 stop
9
 /root/letsencrypt/letsencrypt-auto certonly -c /etc/letsencrypt/cli.conf --domains $d
9
 /root/letsencrypt/letsencrypt-auto certonly -c /etc/letsencrypt/cli.conf --domains $d
10
+service apache2 start

Loading…
Cancel
Save