Skip to content

Commit

Permalink
Add WORKDIR to entrypoing
Browse files Browse the repository at this point in the history
  • Loading branch information
tsigouris007 committed Feb 8, 2024
1 parent 3e4987f commit 161c286
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash

WORKDIR="/home/user"
CONFIG="cs.falconhoseclient.cfg"

# Read the .env file properties
Expand Down Expand Up @@ -29,6 +30,6 @@ fi
echo "API Base URL: $API_BASE_URL"

# Substitute things properly
export $(echo "CLIENT_ID=$CLIENT_ID CLIENT_SECRET=$CLIENT_SECRET API_BASE_URL=$API_BASE_URL") && envsubst < "./${CONFIG}.template" > "./${CONFIG}"
export $(echo "CLIENT_ID=$CLIENT_ID CLIENT_SECRET=$CLIENT_SECRET API_BASE_URL=$API_BASE_URL") && envsubst < "${WORKDIR}/${CONFIG}.template" > "${WORKDIR}/${CONFIG}"

/opt/crowdstrike/bin/cs.falconhoseclient -nodaemon -config="./${CONFIG}" 2>&1
/opt/crowdstrike/bin/cs.falconhoseclient -nodaemon -config="${WORKDIR}/${CONFIG}" 2>&1

0 comments on commit 161c286

Please sign in to comment.