mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2025-01-12 16:14:45 +08:00
[ACME, Compose] Add new image; fix AAAA check for MAILCOW_HOSTNAME
This commit is contained in:
parent
f27c93d995
commit
8adf3d27db
@ -28,7 +28,7 @@ log_f "Waiting for Docker API..." no_nl
|
|||||||
until ping dockerapi -c1 > /dev/null; do
|
until ping dockerapi -c1 > /dev/null; do
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
log_f "Found Docker API" no_date
|
log_f "OK" no_date
|
||||||
|
|
||||||
ACME_BASE=/var/lib/acme
|
ACME_BASE=/var/lib/acme
|
||||||
SSL_EXAMPLE=/var/lib/ssl-example
|
SSL_EXAMPLE=/var/lib/ssl-example
|
||||||
@ -135,6 +135,8 @@ log_f "Waiting for database... "
|
|||||||
while ! mysqladmin ping --host mysql -u${DBUSER} -p${DBPASS} --silent; do
|
while ! mysqladmin ping --host mysql -u${DBUSER} -p${DBPASS} --silent; do
|
||||||
sleep 2
|
sleep 2
|
||||||
done
|
done
|
||||||
|
log_f "Initializing, please wait... "
|
||||||
|
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
if [[ "${SKIP_IP_CHECK}" =~ ^([yY][eE][sS]|[yY])+$ ]]; then
|
if [[ "${SKIP_IP_CHECK}" =~ ^([yY][eE][sS]|[yY])+$ ]]; then
|
||||||
@ -214,16 +216,25 @@ while true; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
A_MAILCOW_HOSTNAME=$(dig A ${MAILCOW_HOSTNAME} +short | tail -n 1)
|
A_MAILCOW_HOSTNAME=$(dig A ${MAILCOW_HOSTNAME} +short | tail -n 1)
|
||||||
if [[ ! -z ${A_MAILCOW_HOSTNAME} ]]; then
|
AAAA_MAILCOW_HOSTNAME=$(dig AAAA ${MAILCOW_HOSTNAME} +short | tail -n 1)
|
||||||
log_f "Found A record for ${MAILCOW_HOSTNAME}: ${A_MAILCOW_HOSTNAME}"
|
if [[ ! -z ${AAAA_MAILCOW_HOSTNAME} ]]; then
|
||||||
if [[ ${IPV4:-ERR} == ${A_MAILCOW_HOSTNAME} ]] || [[ ${SKIP_IP_CHECK} == "y" ]]; then
|
log_f "Found AAAA record for ${MAILCOW_HOSTNAME}: ${AAAA_MAILCOW_HOSTNAME} - skipping A record check"
|
||||||
log_f "Confirmed A record ${MAILCOW_HOSTNAME}"
|
if [[ $(expand ${IPV6:-"0000:0000:0000:0000:0000:0000:0000:0000"}) == $(expand ${AAAA_MAILCOW_HOSTNAME}) ]] || [[ ${SKIP_IP_CHECK} == "y" ]]; then
|
||||||
|
log_f "Confirmed AAAA record ${MAILCOW_HOSTNAME}"
|
||||||
VALIDATED_MAILCOW_HOSTNAME=${MAILCOW_HOSTNAME}
|
VALIDATED_MAILCOW_HOSTNAME=${MAILCOW_HOSTNAME}
|
||||||
else
|
else
|
||||||
log_f "Cannot match your IP ${IPV4} against hostname ${MAILCOW_HOSTNAME} (${A_MAILCOW_HOSTNAME}) "
|
log_f "Cannot match your IP ${IPV6:-NO_IPV6_LINK} against hostname ${MAILCOW_HOSTNAME} ($(expand ${AAAA_MAILCOW_HOSTNAME}))"
|
||||||
|
fi
|
||||||
|
elif [[ ! -z ${A_MAILCOW_HOSTNAME} ]]; then
|
||||||
|
log_f "Found A record for ${MAILCOW_HOSTNAME}: ${A_MAILCOW_HOSTNAME}"
|
||||||
|
if [[ ${IPV4:-ERR} == ${A_MAILCOW_HOSTNAME} ]] || [[ ${SKIP_IP_CHECK} == "y" ]]; then
|
||||||
|
log_f "Confirmed A record ${A_MAILCOW_HOSTNAME}"
|
||||||
|
VALIDATED_MAILCOW_HOSTNAME=${MAILCOW_HOSTNAME}
|
||||||
|
else
|
||||||
|
log_f "Cannot match your IP ${IPV4} against hostname ${MAILCOW_HOSTNAME} (${A_MAILCOW_HOSTNAME})"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
log_f "No A record for ${MAILCOW_HOSTNAME} found"
|
log_f "No A or AAAA record found for hostname ${MAILCOW_HOSTNAME}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for SAN in "${ADDITIONAL_SAN_ARR[@]}"; do
|
for SAN in "${ADDITIONAL_SAN_ARR[@]}"; do
|
||||||
|
@ -297,7 +297,7 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
- nginx-mailcow
|
- nginx-mailcow
|
||||||
- mysql-mailcow
|
- mysql-mailcow
|
||||||
image: mailcow/acme:1.29
|
image: mailcow/acme:1.30
|
||||||
build: ./data/Dockerfiles/acme
|
build: ./data/Dockerfiles/acme
|
||||||
sysctls:
|
sysctls:
|
||||||
- net.ipv6.conf.all.disable_ipv6=${SYSCTL_IPV6_DISABLED:-0}
|
- net.ipv6.conf.all.disable_ipv6=${SYSCTL_IPV6_DISABLED:-0}
|
||||||
|
Loading…
Reference in New Issue
Block a user