1234567891011121314151617181920212223242526272829303132333435363738 |
- #!/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 stage www mail autoconfig stats news cloud git matrix status social comments iot wiki jitsi kanboard chat; 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
- certbot certonly --standalone -c /etc/letsencrypt/cli.conf --domains $d
- service apache2 start
|