Current time: 05-05-2024, 04:00 AM Hello There, Guest! (LoginRegister)


Post Reply 
Update to actual trunk...
Author Message
rbtux Offline
Moderator
*****
Moderators

Posts: 1,847
Joined: Feb 2007
Reputation: 33
Post: #1
Update to actual trunk...
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...
(This post was last modified: 12-07-2007 07:53 PM by rbtux.)
12-07-2007 07:53 PM
Visit this user's website Find all posts by this user Quote this message in a reply
gOOvER Offline
Banned

Posts: 3,561
Joined: Jul 2007
Post: #2
RE: Update to actual trunk...
I take this at the End of this thread.

http://www.isp-control.net/forum/many-pe...-1927.html
12-07-2007 08:01 PM
Visit this user's website Find all posts by this user Quote this message in a reply
rbtux Offline
Moderator
*****
Moderators

Posts: 1,847
Joined: Feb 2007
Reputation: 33
Post: #3
RE: Update to actual trunk...
Thanks I'll try this out...
12-07-2007 08:10 PM
Visit this user's website Find all posts by this user Quote this message in a reply
gOOvER Offline
Banned

Posts: 3,561
Joined: Jul 2007
Post: #4
RE: Update to actual trunk...
You only have to edit /logrotate/apache2
12-07-2007 08:20 PM
Visit this user's website Find all posts by this user Quote this message in a reply
rbtux Offline
Moderator
*****
Moderators

Posts: 1,847
Joined: Feb 2007
Reputation: 33
Post: #5
RE: Update to actual trunk...
Yes I figured this out by myself... I'll see if it works after the next rotation...

Thank you
12-07-2007 08:28 PM
Visit this user's website Find all posts by this user Quote this message in a reply
rbtux Offline
Moderator
*****
Moderators

Posts: 1,847
Joined: Feb 2007
Reputation: 33
Post: #6
RE: Update to actual trunk...
can plz somebody post an apache2 logrotate file for r942?
12-10-2007 04:44 AM
Visit this user's website Find all posts by this user Quote this message in a reply
gOOvER Offline
Banned

Posts: 3,561
Joined: Jul 2007
Post: #7
RE: Update to actual trunk...
Code:
/var/www/ispcp/engine/awstats/awstats_updateall.pl now -awstatsprog=/usr/lib/cgi-bin/awstats.pl &> /dev/null

That's my line Smile
12-10-2007 06:42 PM
Visit this user's website Find all posts by this user Quote this message in a reply
rbtux Offline
Moderator
*****
Moderators

Posts: 1,847
Joined: Feb 2007
Reputation: 33
Post: #8
RE: Update to actual trunk...
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
}
12-10-2007 06:46 PM
Visit this user's website Find all posts by this user Quote this message in a reply
gOOvER Offline
Banned

Posts: 3,561
Joined: Jul 2007
Post: #9
RE: Update to actual trunk...
This one looks good. It's the same as my.
12-10-2007 06:53 PM
Visit this user's website Find all posts by this user Quote this message in a reply
rbtux Offline
Moderator
*****
Moderators

Posts: 1,847
Joined: Feb 2007
Reputation: 33
Post: #10
RE: Update to actual trunk...
OK thx...
12-10-2007 06:54 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)