#!/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  5.3.4     02/08/05 DB"

# See how we were called.

case "$1" in
start)
        if [ -f /usr/local/sbin/e2guardian ] &&
           [ -f /etc/e2guardian/e2guardian.conf ]; then
                /usr/local/sbin/e2guardian
                echo "E2Guardian started."
        fi
        ;;
stop)
        if [ -f /var/run/e2guardian.pid ]; then
                /usr/local/sbin/e2guardian -q
                /bin/rm -f /var/run/e2guardian.pid
                /bin/rm -f /tmp/.dguardianipc
                echo "E2Guardian stopped."
        fi
        ;;
restart)
        $0 stop
        sleep 3
        $0 start
        ;;
status)
        if [ -f /usr/local/sbin/e2guardian ]; then
                /usr/local/sbin/e2guardian -s
        fi
        ;;
*)

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


exit 0
