commit e53f252078c4f5da4aec131b91c97573caf85c1b
parent 19d94af588b834f92fecd7f7cffd2bffb60c5855
Author: Jan Dankert <develop@jandankert.de>
Date: Sun, 21 Apr 2019 10:15:04 +0200
Merge branch 'master' of ssh://weiherhei.de:/etc/cron.hourly
Diffstat:
1 file changed, 7 insertions(+), 15 deletions(-)
diff --git a/update_httpd b/update_httpd
@@ -84,7 +84,7 @@ EOF
cat >> $CONFFILE <<EOF
<VirtualHost *:80>
- # Kein Domainverantwortlicher vorhanden
+ # No domain owner available
ServerName $domain
Include $HTTPD_EXTRA_CONFIG_DIR/$domain.conf
</VirtualHost>
@@ -94,7 +94,7 @@ EOF
cat >> $CONFFILE <<EOF
<VirtualHost *:80>
- # Kein Domainverantwortlicher vorhanden
+ # Domain owner: $user
ServerName $domain
RewriteEngine on
@@ -128,9 +128,12 @@ EOF
+ # Zertifikatsdatei bestimmen
+ key=/etc/ssl/local/server.key
+ crt=/etc/ssl/local/cert/$domain.crt
- if [ $ssl -eq 0 ]; then
-
+ if [ $ssl -eq 0 ] || [ ! -f $crt ]; then
+ # no SSL or no SSL cert available
cat >> $CONFFILE <<EOF
#<VirtualHost *:443>
@@ -144,17 +147,6 @@ EOF
<VirtualHost *:80>
EOF
else
- # Zertifikatsdatei bestimmen
- key=/etc/ssl/local/server.key
- crt=/etc/ssl/local/cert/$domain.crt
- if [ ! -f $crt ]; then
- mailcrt=/etc/ssl/local/cert/`postconf -h myhostname`.crt
- if [ -f $mailcrt ]; then
- ln -s $mailcrt $crt
- else
- touch $crt # Leere Zertifikatsdatei anlegen.
- fi
- fi
cat >> $CONFFILE <<EOF