diff options
| author | mo khan <mo@mokhan.ca> | 2025-05-12 13:40:49 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2025-05-12 13:40:49 -0600 |
| commit | 4bd72e131c7db3093c7bd4236a5d2319462fcbad (patch) | |
| tree | 677e48ca90cefa3da7c71cd568341a67d09d4c16 /bin | |
| parent | 251539d40e89b3bc91dea14ed6afb311788962df (diff) | |
chore: mimic how services are run between docker and host machine
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/envoy.sh | 8 | ||||
| -rwxr-xr-x | bin/init.sh | 3 |
2 files changed, 9 insertions, 2 deletions
diff --git a/bin/envoy.sh b/bin/envoy.sh index a123c62..8690bd1 100755 --- a/bin/envoy.sh +++ b/bin/envoy.sh @@ -2,10 +2,11 @@ set -e [ -n "$DEBUG" ] && set -x +cd "$(dirname "$0")/.." oidc_scheme=$(echo "$OIDC_ISSUER" | awk -F[/:] '{print $1}') oidc_host=$(echo "$OIDC_ISSUER" | awk -F[/:] '{print $4}') -yaml=$(sed -e "s/OAUTH_CLIENT_ID/$OAUTH_CLIENT_ID/" /etc/envoy/envoy.yaml) +yaml=$(sed -e "s/OAUTH_CLIENT_ID/$OAUTH_CLIENT_ID/" etc/envoy/envoy.yaml) yaml=$(echo "$yaml" | sed -e "s,https://example.com,$OIDC_ISSUER,") yaml=$(echo "$yaml" | sed -e "s/example.com/$oidc_host/") @@ -26,6 +27,11 @@ if [ -z "$HMAC_SESSION_SECRET" ]; then export HMAC_SESSION_SECRET="$OAUTH_CLIENT_SECRET" fi +if ! command -v envoy; then + echo "envoy could not be found" + exit 1 +fi + echo "[$(date "+%H:%M:%S")] ==> Starting…" envoy \ --config-yaml "$yaml" \ diff --git a/bin/init.sh b/bin/init.sh index 105c85a..6daf261 100755 --- a/bin/init.sh +++ b/bin/init.sh @@ -4,5 +4,6 @@ set -e [ -n "$DEBUG" ] && set -x +cd "$(dirname "$0")/.." echo "[$(date "+%H:%M:%S")] ==> Starting…" -/usr/local/bin/sparkled & /usr/local/bin/envoy.sh +./bin/sparkled & ./bin/envoy.sh |
