#!/bin/sh
#
# Solaris startup script for e2guardian
# partly based on httpd startup script
#
# description: A web content filtering plugin for web \
#              proxies, developed to filter using lists of \
#              banned phrases, MIME types, filename \
#              extensions and PICS labelling.
#ident	"@(#)e2guardian  @PACKAGE_VERSION@     02/08/05 DB"

# See how we were called.

case "$1" in
start)
        if [ -f @DGBINDIR@/e2guardian ] &&
           [ -f @DGCONFDIR@/e2guardian.conf ]; then
                @DGBINDIR@/e2guardian
                echo "E2Guardian started."
        fi
        ;;
stop)
        if [ -f @DGPIDDIR@/e2guardian.pid ]; then
                @DGBINDIR@/e2guardian -q
                /bin/rm -f @DGPIDDIR@/e2guardian.pid
                /bin/rm -f /tmp/.dguardianipc
                echo "E2Guardian stopped."
        fi
        ;;
restart)
        $0 stop
        sleep 3
        $0 start
        ;;
status)
        if [ -f @DGBINDIR@/e2guardian ]; then
                @DGBINDIR@/e2guardian -s
        fi
        ;;
*)

        echo "Usage: $0 {start|stop|restart}" >&2
        ;;
esac


exit 0
