Merge branch 'master' of git.oopen.de:install/mailsystem

This commit is contained in:
Christoph 2019-07-10 22:01:20 +02:00
commit 4acb74321f

View File

@ -191,8 +191,12 @@ MAIN_DOMAIN=${_tmp_string##*.}
[[ -n "$ROUNDCUBE_TMPDIR" ]] || ROUNDCUBE_TMPDIR="$DEFAULT_ROUNDCUBE_TMPDIR"
[[ -n "$IPV4" ]] || fatal "IPv4 Address (IPV4) not present!"
[[ -n "$IPV6" ]] || fatal "IPv4 Address (IPV6) not present!"
if [[ -z "$IPV4" ]] && [[ -z "$IPV6" ]] ; then
fatal "Neither an IPv4 nor an IPv6 address are given.!"
else
[[ -n "$IPV4" ]] || warn "IPv4 Address not present!"
[[ -n "$IPV6" ]] || warn "IPv6 Address not present!"
fi
[[ -n "$APACHE_DEBIAN_INSTALLATION" ]] || APACHE_DEBIAN_INSTALLATION=false
[[ -n "$PHP_DEBIAN_INSTALLATION" ]] || PHP_DEBIAN_INSTALLATION=false
@ -1221,10 +1225,26 @@ fi
echononl "\tCreate VHost Configuration '${WEBSITE_NAME}.conf'.."
_failed=false
cat <<EOF > ${APACHE_VHOST_DIR}/${WEBSITE_NAME}.conf 2>> $log_file
_create_vhost_config=true
if [[ -n "$IPV6" ]] && [[ -n "$IPV4" ]] ; then
_vhost_ip_string_80="$IPV4:80 [$IPV6]:80"
_vhost_ip_string_443="$IPV4:443 [$IPV6]:443"
elif [[ -n "$IPV4" ]] ; then
_vhost_ip_string_80="$IPV4:80"
_vhost_ip_string_443="$IPV4:443"
elif [[ -n "$IPV6" ]] ; then
_vhost_ip_string_80=" [$IPV6]:80"
_vhost_ip_string_443=" [$IPV6]:443"
else
echo_failed
error "Neither an ipv4 nor an ipv6 address are given.!"
_create_vhost_config=false
fi
if $_create_vhost_config ; then
cat <<EOF > ${APACHE_VHOST_DIR}/${WEBSITE_NAME}.conf 2>> $log_file
# -- $WEBSITE_NAME -- #
<VirtualHost $IPV4:80 [$IPV6]:80>
<VirtualHost ${_vhost_ip_string_80}:80>
ServerAdmin $WEBMASTER_EMAIL
@ -1240,7 +1260,7 @@ cat <<EOF > ${APACHE_VHOST_DIR}/${WEBSITE_NAME}.conf 2>> $log_file
</VirtualHost>
<VirtualHost $IPV4:443 [$IPV6]:443>
<VirtualHost ${_vhost_ip_string_443}:443>
ServerAdmin $WEBMASTER_EMAIL