Skip to content

Commit

Permalink
Use fd instead of /dev/stdout
Browse files Browse the repository at this point in the history
  • Loading branch information
tsigouris007 committed Mar 4, 2024
1 parent 45b6da8 commit 1639c5f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cfg/cs.falconhoseclient.cfg.template
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ output_format = json
# Will be true regardless if Syslog is not enabled
# If path does not exist or user has no permission, log file will be used
output_to_file = true
output_path = /dev/stdout
output_path = /dev/fd/1

# Offset file full filepath and filename
offset_path = /var/log/crowdstrike/falconhoseclient/stream_offsets
Expand Down
3 changes: 1 addition & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
WORKDIR="/home/user"
CONFIGDIR="/opt/crowdstrike/etc"
CONFIG="cs.falconhoseclient.cfg"
LOGDIR="/var/log/crowdstrike/falconhoseclient"

# Read the .env file properties
F_CLIENT_ID="$(grep CLIENT_ID .env | awk -F'=' '{print $2}')"
Expand Down Expand Up @@ -31,5 +30,5 @@ fi
# Substitute things properly
export $(echo "CLIENT_ID=$CLIENT_ID CLIENT_SECRET=$CLIENT_SECRET API_BASE_URL=$API_BASE_URL") && envsubst < "${WORKDIR}/${CONFIG}.template" > "${CONFIGDIR}/${CONFIG}"

# Run this in the background and output the enrollment into a file
# Run the client
cs.falconhoseclient -nodaemon -config="${CONFIGDIR}/${CONFIG}" 2>&1

0 comments on commit 1639c5f

Please sign in to comment.