12345678910111213141516171819202122232425262728293031323334353637 |
- #!/bin/bash
-
-
-
-
-
- d=""
- for domain in "$@"; do
-
-
- if (getent hosts $domain > /dev/null); then
- if [ -z "$d" ]; then
- d="$domain";
- else
- d="$d,$domain";
- fi
- fi
-
-
- for sub in www mail autoconfig fathom news cloud git; do
-
- if (getent hosts $sub.$domain > /dev/null); then
- if [ -z "$d" ]; then
- d="$sub.$domain";
- else
- d="$d,$sub.$domain";
- fi
- fi
- done
- done
-
-
-
-
- service apache2 stop
- /root/letsencrypt/letsencrypt-auto certonly -c /etc/letsencrypt/cli.conf --domains $d
- service apache2 start
|