Skip to content

Commit d008523

Browse files
committed
profile: remove last exit
this was missed out in 25b0edb, but this shouldn't affect the case where APPD_AGENT is set.
1 parent 6d4a9c2 commit d008523

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

profile/appdynamics-setup.sh

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,16 @@ if [ -z "${APPD_AGENT}" ]; then
3232
fi
3333

3434
application_name=$(echo "${VCAP_APPLICATION}" | jq -r '.application_name')
35-
if [ -z "${application_name}" ]; then
36-
exit 0
37-
fi
38-
39-
if [ -z "${APPDYNAMICS_AGENT_APPLICATION_NAME}" ]; then
40-
export APPDYNAMICS_AGENT_APPLICATION_NAME="${application_name}"
41-
fi
42-
if [ -z "${APPDYNAMICS_AGENT_TIER_NAME}" ]; then
43-
export APPDYNAMICS_AGENT_TIER_NAME="${application_name}"
44-
fi
45-
if [ -z "${APPDYNAMICS_AGENT_NODE_NAME}" ]; then
46-
export APPDYNAMICS_AGENT_NODE_NAME="${application_name}:${CF_INSTANCE_INDEX}"
35+
if [ -n "${application_name}" ]; then
36+
if [ -z "${APPDYNAMICS_AGENT_APPLICATION_NAME}" ]; then
37+
export APPDYNAMICS_AGENT_APPLICATION_NAME="${application_name}"
38+
fi
39+
if [ -z "${APPDYNAMICS_AGENT_TIER_NAME}" ]; then
40+
export APPDYNAMICS_AGENT_TIER_NAME="${application_name}"
41+
fi
42+
if [ -z "${APPDYNAMICS_AGENT_NODE_NAME}" ]; then
43+
export APPDYNAMICS_AGENT_NODE_NAME="${application_name}:${CF_INSTANCE_INDEX}"
44+
fi
4745
fi
4846
fi
4947
fi

0 commit comments

Comments
 (0)