#!/bin/sh

case "$1" in
start)
	if [ -x /usr/local/drweb/drwebd ]; then
		rm -f /usr/local/drweb/run/drwebd.sock;
		/usr/local/drweb/drwebd -ini:/usr/local/drweb/drweb32.ini && \
		    echo -n ' drwebd';
	fi
	;;
stop)
	if [ -r /usr/local/drweb/run/drwebd.pid ]; then
		kill `cat  /usr/local/drweb/run/drwebd.pid` >/dev/null 2>& 1;
		echo -n ' drwebd';
	fi
	;;
*)
	echo "Usage: `basename $0` {start|stop}" >&2
	;;
esac

exit 0
