#!/bin/bash

# ucsc-smartsuite init file for snmpd
# processname: smartd 
#
# Authors:  From smartsuite sources
# Adapted for mdk: Olivier Thauvin <thauvin@aerov.jussieu.fr>
#
# chkconfig: 345 05 97
# description: Self Monitoring and Reporting Technology (SMART) Daemon
#

# source function library
. /etc/rc.d/init.d/functions

case "$1" in
  start)
	gprintf "Starting smartd: "
    daemon /usr/local/sbin/smartd
	touch /var/lock/subsys/smartd
	echo
	;;
  stop)
	gprintf "Shutting down snmpd: "
	killproc smartd
	rm -f /var/lock/subsys/smartd
	echo
	;;
  restart|reload)
        $0 stop
        $0 start
        ;;
  status)
        status smartd
        ;;
  *)
	gprintf "Usage: smartd {start|stop|restart|status|reload}\n"
	exit 1
esac

exit 0
