#! /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: dansguardian1 # pidfile: /var/run/dansguardian1.pid # config: /etc/dansguardian1/dansguardian.conf CONFFILELOCATION=/etc/dansguardian1/ BINARYLOCATION=/usr/sbin/ PIDDIR=/var/run/ # See how we were called case "$1" in start) if [ -f ${BINARYLOCATION}dansguardian1 ] && [ -f ${CONFFILELOCATION}dansguardian.conf ]; then echo " * Starting dansguardian1..." if ${BINARYLOCATION}dansguardian1 -c /etc/dansguardian1/dansguardian.conf 2> /dev/null; then echo " [ ok ]" touch /var/lock/dansguardian1 else echo " [ FAILED ]" fi fi ;; stop) echo " * Shutting down dansguardian1..." if ${BINARYLOCATION}dansguardian1 -c /etc/dansguardian1/dansguardian.conf -q 2> /dev/null; then echo " [ ok ]" /bin/rm -f ${PIDDIR}dansguardian1.pid /bin/rm -f /tmp/.dguardian1ipc /bin/rm -f /var/lock/dansguardian1 else echo " [ FAILED ]" fi ;; reload|restart) $0 stop sleep 3 $0 start ;; status) if [ -f ${BINARYLOCATION}dansguardian1 ]; then ${BINARYLOCATION}dansguardian1 -c /etc/dansguardian1/dansguardian.conf -s fi ;; *) echo "Usage: {start|stop|restart|status}" >&2 ;; esac exit 0