]>
git.ipfire.org Git - thirdparty/sarg.git/blob - user_limit_block
3 # AUTHOR: Pedro Lineu Orso pedro.orso@gmail.com
5 # SARG Squid Analysis Report Generator http://sarg.sourceforge.net
8 # please look at http://sarg.sourceforge.net/donations.php
9 # ---------------------------------------------------------------------
11 # This program is free software; you can redistribute it and/or modify
12 # it under the terms of the GNU General Public License as published by
13 # the Free Software Foundation; either version 2 of the License, or
14 # (at your option) any later version.
16 # This program is distributed in the hope that it will be useful,
17 # but WITHOUT ANY WARRANTY; without even the implied warranty of
18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 # GNU General Public License for more details.
21 # You should have received a copy of the GNU General Public License
22 # along with this program; if not, write to the Free Software
23 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
27 conf
="/usr/local/sarg/sarg.conf"
28 squid_password_file
="/usr/local/squid/etc/passwd"
29 tmp
="/tmp/sarg_limit.$$"
31 limit_file
=`grep "per_user_limit" $conf|grep -v "#"|awk '{print $2}'`
33 if [ "$limit_file" != "" ]; then
35 cat $limit_file|
while read key
; do
36 uline
=`grep $key $squid_password_file`
37 grep -v $key $squid_password_file > $tmp
38 echo $uline|
sed 's/:/:*/g' >> $tmp
39 cat $tmp > $squid_password_file