Skip to content

Commit

Permalink
Update install_script.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
akshun4 committed Feb 17, 2020
1 parent 1ab7f16 commit 21bf367
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions cmd/agent/install_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,12 @@ else
repo_url="datadoghq.com"
fi

if [ -n "$APM_CONFIG" ]; then
apm_config=$APM_CONFIG
if [ -n "$APM_ENABLED" ]; then
apm_config=$APM_ENABLED
fi

if [ -n "$PROCESS_CONFIG" ]; then
process_config=$PROCESS_CONFIG
if [ -n "$PROCESS_ENABLED" ]; then
process_config=$PROCESS_ENABLED
fi

dd_upgrade=
Expand Down Expand Up @@ -328,11 +328,11 @@ else
fi
if [ $apm_config ]; then
printf "\033[34m\n* Adding your APM Configuration to the Agent configuration: $CONF\n\033[0m\n"
$sudo_cmd sh -c "sed -i 's/# apm_config:.*/apm_config:\n enabled:$apm_config/' $CONF"
$sudo_cmd sh -c "sed -i 's/# apm_config:.*/apm_config:\n enabled: false/' $CONF"
fi
if [ $process_config ]; then
printf "\033[34m\n* Adding your Process Configuration to the Agent configuration: $CONF\n\033[0m\n"
$sudo_cmd sh -c "sed -i \"s/# process_config:.*/process_config:\n enabled:"$process_config"/\" $CONF"
$sudo_cmd sh -c "sed -i 's/# process_config:.*/process_config:\n enabled: "true"/' $CONF"
fi
$sudo_cmd chown dd-agent:dd-agent $CONF
$sudo_cmd chmod 640 $CONF
Expand Down

0 comments on commit 21bf367

Please sign in to comment.