1
0
mirror of https://github.com/zokradonh/kopano-docker synced 2025-06-07 16:06:14 +00:00
Felix Bartels d514ef44cb
implement new env variable to disable all automatic actions (#434)
* implement new env variable to disable all automatic actions

fixes https://github.com/zokradonh/kopano-docker/issues/360

* wrap the remaining services in checks if autoconfigure/disable_checks is used
* move definition of AUTOCONFIGURE variable into base image
* add logic to kapps and kdav container
* add autoconfigure to konnect container
* update build stage to latest golang
* add autoconfig to remaining images
* delete obsolete apache config in z-push folder
* when specifying config paths use KOPANO_CONFIG_PATH
* also use env variable in helper scripts
* add message about removal of kopano-cli
2020-08-28 09:48:32 +02:00

68 lines
1.4 KiB
Bash
Executable File

#!/bin/sh
set -e
[ "$DEBUG" ] && set -x
if [ -n "${log_level:-}" ]; then
set -- "$@" --log-level="$log_level"
fi
if [ -n "${oidc_issuer_identifier:-}" ]; then
set -- "$@" --iss="$oidc_issuer_identifier"
fi
if [ -n "${kwm_server_urls:-}" ]; then
for url in $kwm_server_urls; do
set -- "$@" --kwmserver-url="$url"
done
fi
if [ -n "${ice_interfaces:-}" ]; then
for ice_if in $ice_interfaces; do
set -- "$@" --use-ice-if="$ice_if"
done
fi
if [ -n "${ice_network_types:-}" ]; then
for ice_network_type in $ice_network_types; do
set -- "$@" --use-ice-network-type="$ice_network_type"
done
fi
if [ -n "${ice_udp_port_range:-}" ]; then
set -- "$@" --use-ice-udp-port-range="$ice_udp_port_range"
fi
if [ "${with_metrics:-}" = "yes" ]; then
set -- "$@" --with-metrics
fi
if [ "${metrics_listen:-}" ]; then
set -- "$@" --metrics-listen="$metrics_listen"
fi
if [ "$INSECURE" = "yes" ]; then
set -- "$@" --insecure
fi
if [ "${AUTOCONFIGURE}" = true ]; then
if [ "$INSECURE" = "yes" ]; then
dockerize \
-skip-tls-verify \
-wait "$oidc_issuer_identifier"/.well-known/openid-configuration \
-timeout 360s
else
dockerize \
-wait "$oidc_issuer_identifier"/.well-known/openid-configuration \
-timeout 360s
fi
# services need to be aware of the machine-id
dockerize \
-wait file:///etc/machine-id \
-wait file:///var/lib/dbus/machine-id
fi
exec kwmbridged serve \
"$@"