#!/usr/bin/env bash set -xeo pipefail if [ -n "${FORCE_HTTPS:-}" ]; then sed -i 's#/dev/null 2>&1; then { apt-get update -y && apt-get install -y --no-install-recommends ca-certificates; } || true # nocheck: shell-or-true -- grandfathered: worked in practice; TODO: sharpen to catch only the exact tolerated error fi cp "${CA_TRUST_CERT}" "/usr/local/share/ca-certificates/${CA_TRUST_NAME}.crt" || true # nocheck: shell-or-true -- grandfathered: worked in practice; TODO: sharpen to catch only the exact tolerated error update-ca-certificates || true # nocheck: shell-or-true -- grandfathered: worked in practice; TODO: sharpen to catch only the exact tolerated error fi echo "++++ Start apache... ++++" # shellcheck disable=SC1091 source /etc/apache2/envvars exec dumb-init apache2 -DFOREGROUND