SOURCES: sarg-user_limit_block (NEW) - from sarg sources
glen
glen at pld-linux.org
Wed Feb 7 18:20:21 CET 2007
Author: glen Date: Wed Feb 7 17:20:21 2007 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- from sarg sources
---- Files affected:
SOURCES:
sarg-user_limit_block (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: SOURCES/sarg-user_limit_block
diff -u /dev/null SOURCES/sarg-user_limit_block:1.1
--- /dev/null Wed Feb 7 18:20:21 2007
+++ SOURCES/sarg-user_limit_block Wed Feb 7 18:20:16 2007
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+conf="/etc/sarg/sarg.conf"
+squid_password_file="/etc/squid/passwd"
+tmp="/tmp/sarg_limit.$$"
+
+limit_file=`grep "per_user_limit" $conf|grep -v "#"|awk '{print $2}'`
+
+if [ "$limit_file" != "" ]; then
+ rm -rf $tmp
+ cat $limit_file|while read key; do
+ uline=`grep $key $squid_password_file`
+ grep -v $key $squid_password_file > $tmp
+ echo $uline|sed 's/:/:*/g' >> $tmp
+ cat $tmp > $squid_password_file
+ rm -rf $tmp
+ done
+fi
================================================================
More information about the pld-cvs-commit
mailing list