Ticket #835: patch.4.txt

File patch.4.txt, 0.8 kB (added by dominiquearpin, 1 year ago)

its the right one

Line 
1 --- trunk/engine/setup/ispcp-setup.orig 2007-11-30 12:18:35.000000000 -0500
2 +++ trunk/engine/setup/ispcp-setup      2007-11-30 11:27:15.000000000 -0500
3 @@ -2469,18 +2469,19 @@
4         # update apache logrotate (check for apache, apache2)
5         #
6  
7 -       @apache_file = ("apache", "apache2");
8 +       my @apache_file = ("apache", "apache2");
9 +       my $apache_file;
10         foreach $apache_file (@apache_file) {
11                 if (-f "/etc/logrotate.d/".$apache_file) {
12 -                       $file = "/etc/logrotate.d/".$apache_file;
13 +                       my $file = "/etc/logrotate.d/".$apache_file;
14                         # search for awstats_updateall.pl
15 -                       $word = "awstats_updateall.pl";
16 +                       my $word = "awstats_updateall.pl";
17  
18                         open(F, '<' ,$file);
19 -                       @lines = <F>;
20 +                       my @lines = <F>;
21                         close(F);
22  
23 -                       $nummatches = grep(/$word/, @lines);
24 +                       my $nummatches = grep(/$word/, @lines);
25  
26                         # add code if not exists
27                         if ($nummatches == 0) {