summaryrefslogtreecommitdiff
path: root/start.sh
diff options
context:
space:
mode:
Diffstat (limited to 'start.sh')
-rw-r--r--start.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/start.sh b/start.sh
index 14d5ce5..d4f2e44 100644
--- a/start.sh
+++ b/start.sh
@@ -1,3 +1,8 @@
#!/bin/sh
-/usr/local/bin/sparkled & /usr/local/bin/envoy -c /etc/envoy/envoy.yaml
+set -ex
+
+oidc_host=$(echo "$OIDC_ISSUER" | sed 's/https\?:\/\///')
+yaml=$(sed "s/OAUTH_CLIENT_ID/$OAUTH_CLIENT_ID/" /etc/envoy/envoy.yaml)
+yaml=$(echo "$yaml" | sed "s/example.com/$oidc_host/")
+/usr/local/bin/sparkled & /usr/local/bin/envoy --config-yaml "$yaml"