scripts: improve panic helpers (#3155)

This commit is contained in:
Georg Lauterbach 2023-03-06 10:06:50 +01:00 committed by GitHub
parent b5fc40eb7a
commit dab70709d9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 53 additions and 34 deletions

View file

@ -182,7 +182,7 @@ function _setup_dovecot_local_user
fi
done
_shutdown 'No accounts provided - Dovecot could not be started'
_dms_panic__fail_init 'accounts provisioning because no accounts were provided - Dovecot could not be started' '' 'immediate'
}
__wait_until_an_account_is_added_or_shutdown
@ -206,7 +206,7 @@ function _setup_dovecot_inet_protocols
PROTOCOL='[::]' # IPv6 only
else
# Unknown value, panic.
dms_panic__invalid_value 'DOVECOT_INET_PROTOCOLS' "${DOVECOT_INET_PROTOCOLS}"
_dms_panic__invalid_value 'DOVECOT_INET_PROTOCOLS' "${DOVECOT_INET_PROTOCOLS}" 'immediate'
fi
sedfile -i "s|^#listen =.*|listen = ${PROTOCOL}|g" /etc/dovecot/dovecot.conf

View file

@ -22,7 +22,7 @@ function _setup_docker_permit
if [[ -z ${CONTAINER_IP} ]]
then
_log 'error' 'Detecting the container IP address failed'
dms_panic__misconfigured 'NETWORK_INTERFACE' 'Network Setup [docker_permit]'
_dms_panic__misconfigured 'NETWORK_INTERFACE' 'Network Setup [docker_permit]' 'immediate'
fi
while read -r IP