git://git.exim.org
/
buildfarm-server.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
New server, FileBin instead of $ENV{BFConfDir}, and custom Captcha
[buildfarm-server.git]
/
scripts
/
purge_old_logs.pl
diff --git
a/scripts/purge_old_logs.pl
b/scripts/purge_old_logs.pl
index 7182f0dadeed692d22df78ba58decf6a5757f36a..ad267bdd0be4528c828c46b4c9e3d6e1556c62f8 100755
(executable)
--- a/
scripts/purge_old_logs.pl
+++ b/
scripts/purge_old_logs.pl
@@
-10,7
+10,9
@@
use Data::Dumper;
use vars qw($dbhost $dbname $dbuser $dbpass $dbport
);
use vars qw($dbhost $dbname $dbuser $dbpass $dbport
);
-require "$ENV{BFConfDir}/BuildFarmWeb.pl";
+
+use FindBin qw($RealBin);
+require "$RealBin/../BuildFarmWeb.pl";
die "no dbname" unless $dbname;
die "no dbuser" unless $dbuser;
die "no dbname" unless $dbname;
die "no dbuser" unless $dbuser;
@@
-35,7
+37,7
@@
my $del_recent_sth = $db->prepare(q[
$del_sth->execute();
$del_recent_sth->execute();
$del_sth->execute();
$del_recent_sth->execute();
-my $buildlogs = "
$ENV{BFConfDir}
/buildlogs";
+my $buildlogs = "
/home/farm/server
/buildlogs";
my @dirs = `find $buildlogs -mindepth 1 -type d -ctime +95`;
foreach my $dir (@dirs) {
my @dirs = `find $buildlogs -mindepth 1 -type d -ctime +95`;
foreach my $dir (@dirs) {