Compare commits

..

5 Commits

Author SHA1 Message Date
FreddleSpl0it
8f883f3d37 Rename dns-101 to dns-01 2026-03-09 15:27:33 +01:00
FreddleSpl0it
709117fe19 prevent false positives in option detection in new_options.sh 2026-03-09 15:19:46 +01:00
FreddleSpl0it
82ea418423 Extend --dev flag to skip _modules update 2026-03-09 15:13:36 +01:00
FreddleSpl0it
fd24163c6e prevent false positives in option detection in new_options.sh 2026-03-09 15:13:13 +01:00
FreddleSpl0it
3caef45a12 Merge pull request #7100 from mailcow/feat/rspamd-3.14.3
[Rspamd] Update to 3.14.3-1
2026-03-09 08:15:10 +01:00
5 changed files with 46 additions and 29 deletions

View File

@@ -64,7 +64,7 @@ adapt_new_options() {
sed -i --follow-symlinks '$a\' mailcow.conf
for option in ${CONFIG_ARRAY[@]}; do
if grep -q "${option}" mailcow.conf; then
if grep -q "^#\?${option}=" mailcow.conf; then
continue
fi
@@ -302,7 +302,7 @@ adapt_new_options() {
;;
ACME_DNS_PROVIDER)
echo '# DNS provider for DNS-01 challenge (e.g. dns_cf, dns_azure, dns_gd, etc.)' >> mailcow.conf
echo '# See the dns-101 provider documentation for more information.' >> mailcow.conf
echo '# See the dns-01 provider documentation for more information.' >> mailcow.conf
echo 'ACME_DNS_PROVIDER=dns_xxx' >> mailcow.conf
;;
ACME_ACCOUNT_EMAIL)

View File

@@ -7,7 +7,7 @@ else
__dns_loader_standalone=0
fi
CONFIG_PATH="${ACME_DNS_CONFIG_FILE:-/etc/acme/dns-101.conf}"
CONFIG_PATH="${ACME_DNS_CONFIG_FILE:-/etc/acme/dns-01.conf}"
if [[ ! -f "${CONFIG_PATH}" ]]; then
if [[ $__dns_loader_standalone -eq 1 ]]; then

View File

@@ -12,7 +12,7 @@ CERT_DOMAINS=(${DOMAINS[@]})
CERT_DOMAIN=${CERT_DOMAINS[0]}
ACME_BASE=/var/lib/acme
# Load optional DNS provider secrets from /etc/acme/dns-101.conf
# Load optional DNS provider secrets from /etc/acme/dns-01.conf
if [[ -f /srv/load-dns-config.sh ]]; then
source /srv/load-dns-config.sh
if declare -F log_f >/dev/null; then

View File

@@ -299,7 +299,7 @@ ACME_DNS_CHALLENGE=n
ACME_DNS_PROVIDER=dns_xxx
ACME_ACCOUNT_EMAIL=me@example.com
# You will need to pass provider-specific environment variables to the acme-mailcow container.
# See the dns-101 provider documentation for more information.
# See the dns-01 provider documentation for more information.
# for example for Azure DNS:
#AZUREDNS_SUBSCRIPTIONID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
#AZUREDNS_TENANTID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

View File

@@ -19,30 +19,48 @@ if [ ! -f "${PWD}/mailcow.conf" ]; then
fi
BRANCH="$(cd "${SCRIPT_DIR}" && git rev-parse --abbrev-ref HEAD)"
# Check for --dev flag early to skip _modules update
for arg in "$@"; do
if [[ "$arg" == "--dev" || "$arg" == "-d" ]]; then
echo -e "\e[32mRunning in Developer mode...\e[0m"
DEV=y
break
fi
done
MODULE_DIR="${SCRIPT_DIR}/_modules"
# Calculate hash before fetch
if [[ -d "${MODULE_DIR}" && -n "$(ls -A "${MODULE_DIR}" 2>/dev/null)" ]]; then
MODULES_HASH_BEFORE=$(find "${MODULE_DIR}" -type f -exec sha256sum {} \; 2>/dev/null | sort | sha256sum | awk '{print $1}')
if [ ! "$DEV" ]; then
# Calculate hash before fetch
if [[ -d "${MODULE_DIR}" && -n "$(ls -A "${MODULE_DIR}" 2>/dev/null)" ]]; then
MODULES_HASH_BEFORE=$(find "${MODULE_DIR}" -type f -exec sha256sum {} \; 2>/dev/null | sort | sha256sum | awk '{print $1}')
else
MODULES_HASH_BEFORE="EMPTY"
fi
echo -e "\e[33mFetching latest _modules from origin/${BRANCH}…\e[0m"
git fetch origin "${BRANCH}"
git checkout "origin/${BRANCH}" -- _modules
if [[ ! -d "${MODULE_DIR}" || -z "$(ls -A "${MODULE_DIR}")" ]]; then
echo -e "\e[31mError: _modules is still missing or empty after fetch!\e[0m"
exit 2
fi
# Calculate hash after fetch
MODULES_HASH_AFTER=$(find "${MODULE_DIR}" -type f -exec sha256sum {} \; 2>/dev/null | sort | sha256sum | awk '{print $1}')
# Check if modules changed
if [[ "${MODULES_HASH_BEFORE}" != "${MODULES_HASH_AFTER}" ]]; then
echo -e "\e[33m_modules have been updated. Please restart the update script.\e[0m"
exit 2
fi
else
MODULES_HASH_BEFORE="EMPTY"
fi
echo -e "\e[33mFetching latest _modules from origin/${BRANCH}…\e[0m"
git fetch origin "${BRANCH}"
git checkout "origin/${BRANCH}" -- _modules
if [[ ! -d "${MODULE_DIR}" || -z "$(ls -A "${MODULE_DIR}")" ]]; then
echo -e "\e[31mError: _modules is still missing or empty after fetch!\e[0m"
exit 2
fi
# Calculate hash after fetch
MODULES_HASH_AFTER=$(find "${MODULE_DIR}" -type f -exec sha256sum {} \; 2>/dev/null | sort | sha256sum | awk '{print $1}')
# Check if modules changed
if [[ "${MODULES_HASH_BEFORE}" != "${MODULES_HASH_AFTER}" ]]; then
echo -e "\e[33m_modules have been updated. Please restart the update script.\e[0m"
exit 2
echo -e "\e[33mDeveloper mode: Skipping _modules update from git\e[0m"
if [[ ! -d "${MODULE_DIR}" || -z "$(ls -A "${MODULE_DIR}")" ]]; then
echo -e "\e[31mError: _modules directory is missing or empty!\e[0m"
exit 2
fi
fi
source _modules/scripts/core.sh
@@ -151,8 +169,7 @@ while (($#)); do
FORCE=y
;;
-d|--dev)
echo -e "\e[32mRunning in Developer mode...\e[0m"
DEV=y
# Already handled at the top of the script before _modules update
;;
--legacy)
CURRENT_BRANCH="$(cd "${SCRIPT_DIR}"; git rev-parse --abbrev-ref HEAD)"