~ubuntu-branches/ubuntu/precise/sarg/precise

« back to all changes in this revision

Viewing changes to user_limit_block

  • Committer: Bazaar Package Importer
  • Author(s): Luigi Gangitano
  • Date: 2006-06-09 17:10:26 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20060609171026-vprx1f7juivk1qzz
Tags: 2.2.1-1
* New upstream release
  - Fixes various segfaults (Closes: #362310)

* debian/sarg-reports.cron.{weekly,monthly}
  - Fixed typo (Closes: #365336)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
conf="/usr/local/sarg/sarg.conf"
 
4
squid_password_file="/usr/local/squid/etc/passwd"
 
5
tmp="/tmp/sarg_limit.$$"
 
6
 
 
7
limit_file=`grep "per_user_limit" $conf|grep -v "#"|awk '{print $2}'`
 
8
 
 
9
if [ "$limit_file" != "" ]; then
 
10
   rm -rf $tmp
 
11
   cat $limit_file|while read key; do
 
12
      uline=`grep $key $squid_password_file`
 
13
      grep -v $key $squid_password_file > $tmp
 
14
      echo $uline|sed 's/:/:*/g' >> $tmp
 
15
      cat $tmp > $squid_password_file
 
16
      rm -rf $tmp
 
17
   done
 
18
fi