diff options
author | Siddharth Wagle <swagle@hortonworks.com> | 2015-01-13 16:22:29 -0800 |
---|---|---|
committer | Siddharth Wagle <swagle@hortonworks.com> | 2015-01-13 18:06:58 -0800 |
commit | e904eb7fa1bb8260bd89fed62cf9bd042f2c0aa3 (patch) | |
tree | 31eadf75d2d38e75058958d28dba2f766c969d7e /ambari-metrics/ambari-metrics-host-monitoring | |
parent | f0f0c7b4bfe690a1e23c14c80b28a397d49cbc65 (diff) |
AMBARI-9034. Add ability to change log and pid dirs for AMS daemons. (swagle)
Diffstat (limited to 'ambari-metrics/ambari-metrics-host-monitoring')
-rw-r--r-- | ambari-metrics/ambari-metrics-host-monitoring/conf/unix/ambari-metrics-monitor | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/ambari-metrics/ambari-metrics-host-monitoring/conf/unix/ambari-metrics-monitor b/ambari-metrics/ambari-metrics-host-monitoring/conf/unix/ambari-metrics-monitor index 5779b5b40e..aaa77c4e7e 100644 --- a/ambari-metrics/ambari-metrics-host-monitoring/conf/unix/ambari-metrics-monitor +++ b/ambari-metrics/ambari-metrics-host-monitoring/conf/unix/ambari-metrics-monitor @@ -102,6 +102,24 @@ while [[ -z "${_ams_configs_done}" ]]; do esac done +#execute ams-env.sh +if [[ -f "${MONITOR_CONF_DIR}/ams-env.sh" ]]; then + . "${MONITOR_CONF_DIR}/ams-env.sh" +else + echo "ERROR: Cannot execute ${MONITOR_CONF_DIR}/ams-env.sh." 2>&1 + exit 1 +fi + +# Set log directory path +if [[ -n "${AMS_MONITOR_LOG_DIR}" ]]; then + OUTFILE=${AMS_MONITOR_LOG_DIR}/ambari-metrics-monitor.out +fi + +# Set pid directory path +if [[ -n "${AMS_MONITOR_PID_DIR}" ]]; then + PIDFILE=${AMS_MONITOR_PID_DIR}/ambari-metrics-monitor.pid +fi + case "$1" in start) |