[Lunar-commits] r24277 - in moonbase/trunk/zbeta: . dansguardian dansguardian/init.d

Stefan Wold ratler at lunar-linux.org
Tue May 1 21:02:16 CEST 2007


Author: ratler
Date: 2007-05-01 21:02:16 +0200 (Tue, 01 May 2007)
New Revision: 24277

Added:
   moonbase/trunk/zbeta/dansguardian/
   moonbase/trunk/zbeta/dansguardian/BUILD
   moonbase/trunk/zbeta/dansguardian/DEPENDS
   moonbase/trunk/zbeta/dansguardian/DETAILS
   moonbase/trunk/zbeta/dansguardian/init.d/
   moonbase/trunk/zbeta/dansguardian/init.d/dansguardian
Log:
Initial import of dansguardian, a web content filter to be used with any proxy of choice

Added: moonbase/trunk/zbeta/dansguardian/BUILD
===================================================================
--- moonbase/trunk/zbeta/dansguardian/BUILD	                        (rev 0)
+++ moonbase/trunk/zbeta/dansguardian/BUILD	2007-05-01 19:02:16 UTC (rev 24277)
@@ -0,0 +1,33 @@
+(
+
+    patch_it $SOURCE2 1 &&
+
+    OPTS+=" --enable-email \
+            --enable-fancydm \
+            --with-logdir=/var/log/dansguardian \
+            --with-piddir=/var/run" &&
+
+    if is_depends clamav; then
+	DGUSER="clamav:clamav"
+	OPTS+=" --with-proxyuser=clamav --with-proxygroup=clamav"
+    else
+	DGUSER="nobody:nogroup"
+	OPTS+=" --with-proxyuser=nobody --with-proxygroup=nogroup"
+    fi &&
+
+    default_build &&
+	 
+    # Be kind and enable clamav in config
+    if is_depends clamav; then
+	sedit "/^#contentscanner.*clamdscan\.conf.*/ s;^#;;" /etc/dansguardian/dansguardian.conf &&
+	sedit "s;^#clamdudsfile.*;clamdudsfile = '/tmp/clamd';" /etc/dansguardian/contentscanners/clamdscan.conf
+    fi &&
+	
+    if [ ! -d /var/log/dansguardian ]; then
+	mkdir -p /var/log/dansguardian
+    fi &&
+
+    devoke_installwatch &&
+    chown -R ${DGUSER} /var/log/dansguardian
+
+) > $C_FIFO 2>&1

Added: moonbase/trunk/zbeta/dansguardian/DEPENDS
===================================================================
--- moonbase/trunk/zbeta/dansguardian/DEPENDS	                        (rev 0)
+++ moonbase/trunk/zbeta/dansguardian/DEPENDS	2007-05-01 19:02:16 UTC (rev 24277)
@@ -0,0 +1,5 @@
+optional_depends "pcre"  "--enable-pcre"  "--disable-pcre"  "for REGEX support" &&
+optional_depends "clamav" \
+                 "--enable-clamd --enable-clamav" \
+                 "--disable-clamd --disable-clamav" \
+                 "for antivirus scan support"

Added: moonbase/trunk/zbeta/dansguardian/DETAILS
===================================================================
--- moonbase/trunk/zbeta/dansguardian/DETAILS	                        (rev 0)
+++ moonbase/trunk/zbeta/dansguardian/DETAILS	2007-05-01 19:02:16 UTC (rev 24277)
@@ -0,0 +1,26 @@
+          MODULE=dansguardian
+         VERSION=2.9.8.5beta
+          SOURCE=$MODULE-2.9.8.5.tar.gz
+         SOURCE2=$MODULE-2.9.8.5-Makefile-nooverwrite.patch
+      SOURCE_URL=http://dansguardian.org/downloads/2/Beta/
+     SOURCE2_URL=$PATCH_URL
+SOURCE_DIRECTORY=$BUILD_DIRECTORY/$MODULE-2.9.8.5
+      SOURCE_VFY=sha1:69a96319532d3d3afec8cf52bb67b52b78fa65dc
+     SOURCE2_VFY=sha1:a6b8ee61431e668b303c6862989ccc942d035848
+        WEB_SITE=http://www.dansguardian.org/
+         ENTERED=20070501
+         UPDATED=20070501
+           SHORT="Content filter for WEB via proxy"
+
+cat << EOF
+Dansguardian filters the actual content of pages based on many methods
+including phrase matching, PICS filtering and URL filtering. It does not
+purely filter based on a banned list of sites like lesser totally
+commercial filters.
+
+DansGuardian is designed to be completely flexible and allows you to
+tailor the filtering to your exact needs. It can be as draconian or as
+unobstructive as you want. The default settings are geared towards what a
+primary school might want but DansGuardian puts you in control of what
+you want to block.
+EOF

Added: moonbase/trunk/zbeta/dansguardian/init.d/dansguardian
===================================================================
--- moonbase/trunk/zbeta/dansguardian/init.d/dansguardian	                        (rev 0)
+++ moonbase/trunk/zbeta/dansguardian/init.d/dansguardian	2007-05-01 19:02:16 UTC (rev 24277)
@@ -0,0 +1,46 @@
+#!/bin/bash
+# dansguardian  This shell script takes care of starting and stopping
+#               dansguardian web content filter
+#
+# chkconfig: 345 95 5
+# description: dansguardian - web content filter
+# pidfile: /var/run/dansguardian.pid
+# processname: dansguardian
+# config: /etc/dansguardian/dansguardian.conf
+
+start() {
+    echo -n "Starting dansguardian: "
+    /usr/sbin/dansguardian 2> /dev/null &&
+    echo -e "$RESULT_OK" ||
+    echo -e "$RESULT_FAIL"
+}
+
+stop() {
+    echo -n "Stopping dansguardian: "
+    /usr/sbin/dansguardian -q &&
+    echo -e "$RESULT_OK" ||
+    echo -e "$RESULT_FAIL"
+}
+
+reload() {
+    echo -n "Reloading dansguardian: "
+    /usr/sbin/dansguardian -g &&
+    echo -e "$RESULT_OK" ||
+    echo -e "$RESULT_FAIL"
+}
+
+status() {
+    /usr/sbin/dansguardian -s
+}
+
+restart() {
+    $0 stop
+    $0 start
+}
+
+case "$1" in
+    start|stop|reload|status) ;;
+    *) echo "Usage: $0 {start|stop|restart|reload|status}" ; exit 1 ;;
+esac
+
+. /lib/lsb/init-functions


Property changes on: moonbase/trunk/zbeta/dansguardian/init.d/dansguardian
___________________________________________________________________
Name: svn:executable
   + *



More information about the Lunar-commits mailing list