3 PIDFILE=/opt/collectd/var/run/collectd.pid
4 DAEMON=/opt/collectd/sbin/collectd
6 . /lib/svc/share/smf_include.sh
10 if [ -f $PIDFILE ] ; then
11 echo "Already running. Stale PID file?"
13 echo "$PIDFILE contains $PID"
15 exit $SMF_EXIT_ERR_FATAL
18 if [ $? -ne 0 ] ; then
19 echo $DAEMON faild to start
20 exit $SMF_EXIT_ERR_FATAL
24 PID=`cat $PIDFILE 2>/dev/null`
25 kill -15 $PID 2>/dev/null
26 pwait $PID 1> /dev/null 2>/dev/null
33 ps -ef | grep collectd | grep -v status | grep -v grep
36 echo "Usage: $0 [ start | stop | restart | status ]"