ispCP - Board - Support
Update to actual trunk... - Printable Version

+- ispCP - Board - Support (http://www.isp-control.net/forum)
+-- Forum: ispCP Omega Support Area (/forum-30.html)
+--- Forum: System Setup & Installation (/forum-32.html)
+--- Thread: Update to actual trunk... (/thread-1955.html)

Pages: 1 2


Update to actual trunk... - rbtux - 12-07-2007 07:53 PM

I'd like to stay up-to-date with my omega to the latest trunk... so I do update my trunks manually by checking the changesets...

In the ispcp-setup between trunk 929 and 941 the following lines were added:

Quote:2472 #
2473 # update apache logrotate if AWStats activated
2474 # (check for apache, apache2)
2475 #
2476
2477 my @apache_file = ("apache", "apache2");
2478 my ($apache_file, $file) = (undef, undef);
2479
2480 foreach $apache_file (@apache_file) {
2481 # check if file exists
2482 if (-f "/etc/logrotate.d/".$apache_file) {
2483 $file = "/etc/logrotate.d/".$apache_file;
2484 print STDOUT "$file \n";
2485
2486 # get file
2487 ($rs, $rdata) = get_file($file);
2488 return $rs if ($rs != 0);
2489
2490 # add code if not exists
2491 if ($rdata !~ m/awstats_updateall\.pl/i) {
2492 $rdata =~ s/sharedscripts/sharedscripts\n\tprerotate\n\t\t$main::cfg{'AWSTATS_ROOT_DIR'}\/awstats_updateall\.pl/gi;
2493 $rs = store_file($file, $rdata, 'root', 'root', 0644);
2494 return $rs if ($rs != 0);
2495 }
2496 }
2497 }


I don't know perl an so I'm not sure how that affects my installation. I see that this rotates the logfiles of apache but I don't know how I manually do this change in my system... Which file under /etc/logrotate.d I have to create? What is the content of that file?

I have Trunk 929 with AwStats Dynamic enabled on Debian Etch...


RE: Update to actual trunk... - gOOvER - 12-07-2007 08:01 PM

I take this at the End of this thread.

http://www.isp-control.net/forum/many-perl-errors-t-1927.html


RE: Update to actual trunk... - rbtux - 12-07-2007 08:10 PM

Thanks I'll try this out...


RE: Update to actual trunk... - gOOvER - 12-07-2007 08:20 PM

You only have to edit /logrotate/apache2


RE: Update to actual trunk... - rbtux - 12-07-2007 08:28 PM

Yes I figured this out by myself... I'll see if it works after the next rotation...

Thank you


RE: Update to actual trunk... - rbtux - 12-10-2007 04:44 AM

can plz somebody post an apache2 logrotate file for r942?


RE: Update to actual trunk... - gOOvER - 12-10-2007 06:42 PM

Code:
/var/www/ispcp/engine/awstats/awstats_updateall.pl now -awstatsprog=/usr/lib/cgi-bin/awstats.pl &> /dev/null

That's my line Smile


RE: Update to actual trunk... - rbtux - 12-10-2007 06:46 PM

Mine looks like this now... Are there any errors left? Wink

Quote:/var/log/apache2/*.log {
weekly
missingok
rotate 52
compress
delaycompress
notifempty
create 640 root adm
sharedscripts
prerotate
/var/www/ispcp/engine/awstats/awstats_updateall.pl now -awstatsprog=/usr/lib/cgi-bin/awstats.pl &> /dev/null
endscript
postrotate
if [ -f /var/run/apache2.pid ]; then
/etc/init.d/apache2 restart > /dev/null
fi
endscript
}



RE: Update to actual trunk... - gOOvER - 12-10-2007 06:53 PM

This one looks good. It's the same as my.


RE: Update to actual trunk... - rbtux - 12-10-2007 06:54 PM

OK thx...