diff options
Diffstat (limited to 'pcr/ganglia/gmetad.rc')
-rw-r--r-- | pcr/ganglia/gmetad.rc | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/pcr/ganglia/gmetad.rc b/pcr/ganglia/gmetad.rc deleted file mode 100644 index 823062fac..000000000 --- a/pcr/ganglia/gmetad.rc +++ /dev/null @@ -1,62 +0,0 @@ -#!/bin/bash - -. /etc/rc.conf -. /etc/rc.d/functions - -get_pid() { - PID=`pidof -o %PPID /usr/sbin/gmetad` -} -get_pid - -case "$1" in - start) - stat_busy "Starting Ganglia gmetad" - [ -z "$PID" ] && /usr/sbin/gmetad - if [ $? -gt 0 ]; then - stat_fail - exit 1 - else - sleep 1 - get_pid - if [ $? -gt 0 ]; then - stat_fail - exit 1 - else - echo $PID > /var/run/gmetad.pid - add_daemon gmetad - stat_done - fi - fi - ;; - - stop) - stat_busy "Stopping Ganglia gmetad" - [ ! -z "$PID" ] && kill $PID > /dev/null - if [ $? -gt 0 ]; then - stat_fail - exit 1 - else - sleep 1 - get_pid - if [ $? -gt 0 ]; then - rm /var/run/gmetad.pid - rm_daemon gmetad - stat_done - else - stat_fail - exit 1 - fi - fi - ;; - - restart) - $0 stop - sleep 1 - $0 start - ;; - - *) - echo "usage: $0 {start|stop|restart}" - exit 1 - -esac |