diff --git a/src/du.pl b/src/du.pl deleted file mode 100644 index 762265bf..00000000 --- a/src/du.pl +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/perl - -$ENV{PATH} = "/usr/bin:/bin"; -$ENV{CDPATH} = ""; - -printf "FIXME: do not work with Debian Compliance"; -exit(1); - - -$A=$ARGV[0]; -sub untaint { - my @list = @_; - for (@list) { - /(.*)/; - $_ = $1; - } wantarray ? @list : $list[0]; -} - -$A=untaint($A); -if ($A=~/^\/var\/alternc\/html\/[a-z0-9]\//) { - open(SI,"/usr/bin/du -s '$A'|"); - $B=; - $B=~/^([0-9]+).*/; - printf "$1\n"; -} -if ($A=~/^\/var\/alternc\/mail\/[a-z0-9_]\//) { - open(SI,"/usr/bin/du -s '$A'|"); - $B=; - $B=~/^([0-9]+).*/; - printf "$1\n"; -} -if ($A=~/^\/var\/alternc\/db\//) { - open(SI,"/usr/bin/du -s '$A'|"); - $B=; - $B=~/^([0-9]+).*/; - printf "$1\n"; -} -if ($A=~/^\/var\/lib\/mailman\//) { - open(SI,"/usr/bin/du -s '$A'|"); - $B=; - $B=~/^([0-9]+).*/; - printf "$1\n"; -} diff --git a/src/spoolsize.php b/src/spoolsize.php index f3bc9f6f..dfbbaf95 100644 --- a/src/spoolsize.php +++ b/src/spoolsize.php @@ -22,7 +22,7 @@ if ($db->query("SELECT uid,login FROM membres;")) { } else { // The QUOTA system being disabled, we need to use 'du' on each folder. $login = $db->f('login'); - $size=exec("/usr/lib/alternc/du.pl /var/www/alternc/".substr($login,0,1)."/".$login); + $size=exec("/usr/bin/du /var/www/alternc/".substr($login,0,1)."/".$login); } $db2->query("REPLACE INTO size_web SET uid=?, size=?;",array(intval($db->f('uid')),intval($size))); echo $db->f('login')." (".(round($size/1024, 1))." MB)\n";