add parameter SKIP_UNBOUND_HEALTHCHECK to old installations

This commit is contained in:
KagurazakaNyaa 2024-01-19 00:07:51 +08:00
parent d2edf359ac
commit 9d4055fc4d

View File

@ -480,6 +480,7 @@ CONFIG_ARRAY=(
"WATCHDOG_VERBOSE"
"WEBAUTHN_ONLY_TRUSTED_VENDORS"
"SPAMHAUS_DQS_KEY"
"SKIP_UNBOUND_HEALTHCHECK"
)
detect_bad_asn
@ -747,6 +748,12 @@ for option in ${CONFIG_ARRAY[@]}; do
echo '# Enable watchdog verbose logging' >> mailcow.conf
echo 'WATCHDOG_VERBOSE=n' >> mailcow.conf
fi
elif [[ ${option} == "SKIP_UNBOUND_HEALTHCHECK" ]]; then
if ! grep -q ${option} mailcow.conf; then
echo "Adding new option \"${option}\" to mailcow.conf"
echo '# Skip Unbound (DNS Resolver) Healthchecks (NOT Recommended!) - y/n' >> mailcow.conf
echo 'SKIP_UNBOUND_HEALTHCHECK=n' >> mailcow.conf
fi
elif ! grep -q ${option} mailcow.conf; then
echo "Adding new option \"${option}\" to mailcow.conf"
echo "${option}=n" >> mailcow.conf