summaryrefslogtreecommitdiff
path: root/start.sh
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2025-05-11 14:33:05 -0600
committermo khan <mo@mokhan.ca>2025-05-11 21:21:38 -0600
commit1bd9cacc7edbba1971e22286e477105ff7b1b38f (patch)
tree7b126b7a388494c5abf08681be83947cc127c986 /start.sh
parentbd382e2ed4af887819a9ad56782a93e5dd35c2d8 (diff)
chore: use awk to parse domain
Diffstat (limited to 'start.sh')
-rw-r--r--start.sh4
1 files changed, 3 insertions, 1 deletions
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