From 1bd9cacc7edbba1971e22286e477105ff7b1b38f Mon Sep 17 00:00:00 2001 From: mo khan Date: Sun, 11 May 2025 14:33:05 -0600 Subject: chore: use awk to parse domain --- start.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'start.sh') diff --git a/start.sh b/start.sh index 60ac92c..f6e1253 100644 --- a/start.sh +++ b/start.sh @@ -4,7 +4,9 @@ set -e [ -z "$DEBUG" ] || set -x -oidc_host=$(echo "$OIDC_ISSUER" | sed 's/https\?:\/\///') +oidc_host=$(echo "$OIDC_ISSUER" | awk -F[/:] '{print $4}') yaml=$(sed "s/OAUTH_CLIENT_ID/$OAUTH_CLIENT_ID/" /etc/envoy/envoy.yaml) yaml=$(echo "$yaml" | sed "s/example.com/$oidc_host/") + +echo "[$(date "+%H:%M:%S")] ==> Starting…" /usr/local/bin/sparkled & /usr/local/bin/envoy --config-yaml "$yaml" --component-log-level oauth2:trace -- cgit v1.2.3