#! /bin/sh # Startup script for dansguardian # # description: A web content filtering plugin for web \ # proxies, developed to filter using lists of \ # banned phrases, MIME types, filename \ # extensions and PICS labling. # processname: dansguardian3 # pidfile: /var/run/dansguardian3.pid # config: /etc/dansguardian3/dansguardian.conf CONFFILELOCATION=/etc/dansguardian3/ BINARYLOCATION=/usr/sbin/ PIDDIR=/var/run/ # See how we were called case "$1" in start) if [ -f ${BINARYLOCATION}dansguardian3 ] && [ -f ${CONFFILELOCATION}dansguardian.conf ]; then echo " * Starting dansguardian3..." if ${BINARYLOCATION}dansguardian3 -c /etc/dansguardian3/dansguardian.conf 2> /dev/null; then echo " [ ok ]" touch /var/lock/dansguardian3 else echo " [ FAILED ]" fi fi ;; stop) echo " * Shutting down dansguardian3..." if ${BINARYLOCATION}dansguardian3 -c /etc/dansguardian3/dansguardian.conf -q 2> /dev/null; then echo " [ ok ]" /bin/rm -f ${PIDDIR}dansguardian3.pid /bin/rm -f /tmp/.dguardian3ipc /bin/rm -f /var/lock/dansguardian3 else echo " [ FAILED ]" fi ;; reload|restart) $0 stop sleep 3 $0 start ;; status) if [ -f ${BINARYLOCATION}dansguardian3 ]; then ${BINARYLOCATION}dansguardian3 -c /etc/dansguardian3/dansguardian.conf -s fi ;; *) echo "Usage: {start|stop|restart|status}" >&2 ;; esac exit 0