From e904eb7fa1bb8260bd89fed62cf9bd042f2c0aa3 Mon Sep 17 00:00:00 2001 From: Siddharth Wagle Date: Tue, 13 Jan 2015 16:22:29 -0800 Subject: AMBARI-9034. Add ability to change log and pid dirs for AMS daemons. (swagle) --- .../conf/unix/ambari-metrics-monitor | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'ambari-metrics/ambari-metrics-host-monitoring') 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) -- cgit v1.2.3