#!/bin/sh
# $CVSHeader$

case $1 in
start)
	if [ -d /usr/local/etc/junkbuster-zlib \
	     -a -x /usr/local/sbin/junkbuster-zlib \
	     -a -f /usr/local/etc/junkbuster-zlib/configfile ]; then
		: seems OK
	else
		echo >&2 "$0: missing files!"
		exit 1
	fi
	cd /usr/local/etc/junkbuster-zlib
	su -m nobody -c "/usr/local/sbin/junkbuster-zlib configfile &" \
	    >/dev/null \
	&& echo -n " junkbuster" \
	|| echo " junkbuster FAILED TO START"
	;;
stop)
	killall junkbuster-zlib && echo -n " junkbuster"
	;;
*)
	echo "Usage: `basename $0` {start|stop}" >&2
	exit 64
	;;
esac

exit 0
