#!/bin/sh
# $Id: gmetad.init,v 1.2 2002/10/18 21:57:58 sacerdoti Exp $
#
# chkconfig: 2345 20 80
# description: gmetad startup script
#
### BEGIN INIT INFO
# Provides:          gmetad
# Required-Start:    $syslog $remote_fs
# X-UnitedLinux-Should-Start: $time ypbind sendmail
# Required-Stop:     $syslog $remote_fs
# X-UnitedLinux-Should-Stop: $time ypbind sendmail
# Default-Start:     3 5
# Default-Stop:      0 1 2 6
# Short-Description: Ganglia gmetad startup script
# Description:       Ganglia gmetad startup script
### END INIT INFO

GMETAD=/usr/sbin/gmetad


. /etc/rc.status

# Reset status of this service
rc_reset

case "$1" in
   start)
      echo -n "Starting GANGLIA gmetad: "
      [ -f $GMETAD ] || exit 1

      startproc $GMETAD
	  rc_status -v
      ;;

  stop)
      echo -n "Shutting down GANGLIA gmetad: "
      killproc $GMETAD
	  rc_status -v
      ;;

  restart|reload)
      $0 stop
      $0 start
      ;;
  status)
      checkproc $GMETAD
      RETVAL=$?
	  rc_status -v
      ;;
  *)
      echo "Usage: $0 {start|stop|restart|status}"
      exit 1
esac

rc_exit
