#! /bin/sh
#
# chkconfig: 2345 40 60
# description: Self Monitoring and Reporting Technology (SMART) Daemon
# processname: /usr/sbin/smartd 
# pidfile: /var/run/smartd.pid
#

start ()
{
	echo -n "Starting smartd: "
	/usr/sbin/smartd -n &&
	echo -e $RESULT_OK || echo -e $RESULT_FAIL
}

stop ()
{
	echo -n "Stopping smartd: "
	/bin/pkill -P 1 smartd &&
	echo -e $RESULT_OK || echo -e $RESULT_FAIL
}

status ()
{
	echo -n "Service smartd: "
	if [ -n "$(/bin/pgrep -P 1 smartd)" ] ; then
		echo -e $RESULT_OK
	else
		echo -e $RESULT_FAIL
	fi
}

. /lib/lsb/init-functions

