1
0
mirror of https://github.com/mailcow/mailcow-dockerized.git synced 2024-12-27 02:43:38 +02:00

[Config] Do not accept non-FQDN as MAILCOW_HOSTNAME

[Config] Add SNAT6_TO_SOURCE
[Update] Do not update on non-FQDN hostname
This commit is contained in:
André 2018-07-11 19:59:21 +02:00
parent 1e59816665
commit b0b18dfc89

View File

@ -32,6 +32,13 @@ while (($#)); do
done
[[ ! -f mailcow.conf ]] && { echo "mailcow.conf is missing"; exit 1;}
source mailcow.conf
DOTS=${MAILCOW_HOSTNAME//[^.]};
if [ ${#DOTS} -lt 2 ]; then
echo "MAILCOW_HOSTNAME (${MAILCOW_HOSTNAME}) is not a FQDN!"
echo "Please change it to a FQDN and run docker-compose down followed by docker-compose up -d"
exit 1
fi
if grep --help 2>&1 | head -n 1 | grep -q -i "busybox"; then echo "BusybBox grep detected, please install gnu grep, \"apk add --no-cache --upgrade grep\""; exit 1; fi
if cp --help 2>&1 | head -n 1 | grep -q -i "busybox"; then echo "BusybBox cp detected, please install coreutils, \"apk add --no-cache --upgrade coreutils\""; exit 1; fi