Add warning if ENABLE_EXPORTER is not set or set to true

This commit is contained in:
djuarezgf 2024-03-18 12:18:19 +01:00
parent 591d95e8db
commit 8cb33c2ddc
1 changed files with 5 additions and 5 deletions

View File

@ -2,9 +2,9 @@
if [ "$ENABLE_DATASHIELD" == true ]; then if [ "$ENABLE_DATASHIELD" == true ]; then
# HACK: This only works because exporter-setup.sh and teiler-setup.sh are sourced after datashield-setup.sh # HACK: This only works because exporter-setup.sh and teiler-setup.sh are sourced after datashield-setup.sh
ENABLE_EXPORTER=true if [ -z "${ENABLE_EXPORTER}" ] || [ "${ENABLE_EXPORTER}" != "true" ]; then
ENABLE_TEILER=true echo "The ENABLE_EXPORTER variable is either not set or not set to 'true'."
fi
OAUTH2_CALLBACK=/oauth2/callback OAUTH2_CALLBACK=/oauth2/callback
OAUTH2_PROXY_SECRET="$(echo \"This is a salt string to generate one consistent encryption key for the oauth2_proxy. It is not required to be secret.\" | openssl rsautl -sign -inkey /etc/bridgehead/pki/${SITE_ID}.priv.pem | base64 | head -c 32)" OAUTH2_PROXY_SECRET="$(echo \"This is a salt string to generate one consistent encryption key for the oauth2_proxy. It is not required to be secret.\" | openssl rsautl -sign -inkey /etc/bridgehead/pki/${SITE_ID}.priv.pem | base64 | head -c 32)"
add_private_oidc_redirect_url "${OAUTH2_CALLBACK}" add_private_oidc_redirect_url "${OAUTH2_CALLBACK}"
@ -29,12 +29,12 @@ if [ "$ENABLE_DATASHIELD" == true ]; then
"id": ., "id": .,
"virtualhost": "\(.):443", "virtualhost": "\(.):443",
"beamconnect": "datashield-connect.\(.).'"$BROKER_ID"'" "beamconnect": "datashield-connect.\(.).'"$BROKER_ID"'"
})}' $sites > /tmp/bridgehead/opal-map/central.json })}' $sites >/tmp/bridgehead/opal-map/central.json
echo "$sites" | docker_jq -n --args '[{ echo "$sites" | docker_jq -n --args '[{
"external": "'"$SITE_ID"':443", "external": "'"$SITE_ID"':443",
"internal": "opal:8443", "internal": "opal:8443",
"allowed": input | map("datashield-connect.\(.).'"$BROKER_ID"'") "allowed": input | map("datashield-connect.\(.).'"$BROKER_ID"'")
}]' > /tmp/bridgehead/opal-map/local.json }]' >/tmp/bridgehead/opal-map/local.json
if [ "$USER" == "root" ]; then if [ "$USER" == "root" ]; then
chown -R bridgehead:docker /tmp/bridgehead chown -R bridgehead:docker /tmp/bridgehead
chmod g+wr /tmp/bridgehead/opal-map/* chmod g+wr /tmp/bridgehead/opal-map/*