3
# Copyright 2011, Hortonworks Inc. All rights reserved.
5
# Licensed under the Apache License, Version 2.0 (the "License");
6
# you may not use this file except in compliance with the License.
7
# You may obtain a copy of the License at
9
# http://www.apache.org/licenses/LICENSE-2.0
11
# Unless required by applicable law or agreed to in writing, software
12
# distributed under the License is distributed on an "AS IS" BASIS,
13
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
# See the License for the specific language governing permissions and
15
# limitations under the License.
17
# Remember to keep this in-sync with the definition of
18
# GANGLIA_RUNTIME_COMPONENTS_UNPACK_DIR in monrpmInstaller.sh.
19
HDP_GANGLIA_RUNTIME_COMPONENTS_DIR=/usr/libexec/hdp/ganglia
20
HDP_GANLIA_GMOND_STARTER=${HDP_GANGLIA_RUNTIME_COMPONENTS_DIR}/startGmond.sh
21
HDP_GANLIA_GMOND_STOPPER=${HDP_GANGLIA_RUNTIME_COMPONENTS_DIR}/stopGmond.sh
22
HDP_GANLIA_GMOND_CHECKER=${HDP_GANGLIA_RUNTIME_COMPONENTS_DIR}/checkGmond.sh
28
echo "============================="
29
echo "Starting hdp-gmond..."
30
echo "============================="
31
[ -f ${HDP_GANLIA_GMOND_STARTER} ] || exit 1
32
eval "${HDP_GANLIA_GMOND_STARTER}"
35
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/hdp-gmond
39
echo "=================================="
40
echo "Shutting down hdp-gmond..."
41
echo "=================================="
42
[ -f ${HDP_GANLIA_GMOND_STOPPER} ] || exit 1
43
eval "${HDP_GANLIA_GMOND_STOPPER}"
46
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/hdp-gmond
55
echo "======================================="
56
echo "Checking status of hdp-gmond..."
57
echo "======================================="
58
[ -f ${HDP_GANLIA_GMOND_CHECKER} ] || exit 1
59
eval "${HDP_GANLIA_GMOND_CHECKER}"
63
echo "Usage: $0 {start|stop|restart|status}"