Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions jobs/dd-agent/spec
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ templates:
config/bpm.yml.erb: config/bpm.yml
data/properties.sh.erb: data/properties.sh
bin/pre-start: bin/pre-start
bin/post-start: bin/post-start
bin/agent_ctl: bin/agent_ctl
bin/process_agent_ctl: bin/process_agent_ctl
bin/trace_agent_ctl: bin/trace_agent_ctl
Expand Down
13 changes: 13 additions & 0 deletions jobs/dd-agent/templates/bin/post-start
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash

# Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2.0 License.
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2017-Present Datadog, Inc.

set -e
set -u

# Add execute flags to any directory inside the bpm run folder, so that the agent can read pidfiles inside.
# This runs as a post-start so that BPM job directories created when starting BPM-managed processes
# (including any future BPM job added to this release) exist by the time we chmod them.
find /var/vcap/sys/run/bpm -type d -print0 | xargs -0 chmod +x || true
2 changes: 0 additions & 2 deletions src/helpers/ensure_directories.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ mkdir -p "$LOG_DIR" && chmod 775 "$LOG_DIR" && chown -R vcap "$LOG_DIR"
mkdir -p "$RUN_DIR" && chmod 775 "$RUN_DIR" && chown -R vcap "$RUN_DIR"
mkdir -p "$TMP_DIR" && chmod 775 "$TMP_DIR" && chown -R vcap "$TMP_DIR"
mkdir -p "$CONFD_DIR" && chmod 775 "$CONFD_DIR" && chown -R vcap "$CONFD_DIR"
# Add execute flags to any directory inside the bpm run folder, so that the agent can read pidfiles inside
find /var/vcap/sys/run/bpm -type d -print0 | xargs -0 chmod +x || true

set +e
set +u
Loading