#!/bin/sh
#
# Solaris startup script for dansguardian
# 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	"@(#)dansguardian  2.12.0.0     02/08/05 DB"

# See how we were called.

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

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


exit 0
