| 123456789101112131415161718192021222324252627282930313233343536 | #!/bin/sh#PKG rrdcollect#INIT 90. /etc/rc.confLIB_D=/var/lib/rrdcollectCGI_S=$LIB_D/rrd.cgiRRD_D=$LIB_D/rrdRRD_F=$(find $RRD_D -name "*.rrd" 2>/dev/null)case $1 inautostop) ;;autostart)	test x"${rrdcollect:-NO}" = x"NO" && exit 0	exec sh $0 start	;;start)	[ -d $LIB_D/img ] || mkdir -p $LIB_D/img	[ -n "$RRD_F" ] || /usr/bin/rrd.sh init	[ -x $CGI_S ] || /usr/bin/rrd.sh cgi	rrdcollect	;;stop)	pkill rrdcollect	;;restart)	sh $0 stop	sh $0 start	;;*)	echo "Usage: $0 {start | stop | restart}"	exit 1	;;esacexit $?
 |