If you wish to stick with this script, a "reload" of Apache will not only
suffice, it will move the logs without dropping a byte of data.

No wonder Apache is far better than IIS (starting another flame war).

- 
John Airey
Internet systems support officer, ITCSD, Royal National Institute for the
Blind,
Bakewell Road, Peterborough PE2 6XU,
Tel.: +44 (0) 1733 375299 Fax: +44 (0) 1733 370848 [EMAIL PROTECTED] 


>-----Original Message-----
>From: Rachel [mailto:[EMAIL PROTECTED]]
>Sent: 11 October 2001 13:14
>To: [EMAIL PROTECTED]
>Subject: Re: Apache connection died
>
>
>the reason for the cronjob:-
>to change the access.log name into more manageble name, like:-
>access.log20011010.gz (to it equal to "access.log for the day of 10 Oct
>2001)
>so need to stop the apache and rename the access.log to new 
>name and gzip
>it.
>here's the log example:-
>
>#!/usr/bin/perl
># This script is mainly for producing rotate access log daily 
>and rename
># it into format access.log(yyyymmdd).gz
>
>$file1=shift;
>print "Attempting to rotate $file1\n";
>
>($sec,$minute,$hour,$mday,$mth,$year,)=localtime(time);
>$year+=1900;
>$mth++;
>$mth='0'.$mth if $mth<=9;
>$mday='0'.$mday if $mday<=9;
>$new_file="$file1$year$mth$mday";
>rename ($file1,$new_file) or die "can't rename:$!\n";
>die "can't restart httpd:$!\n" if 
>system('/usr/local/apache/bin/apachectl
>restart');
>print "Sleeping after move\n";
>sleep 10;
>print "Zipping the file up\n";
>die "can't gzip:$!\n" if system("gzip $new_file");
>print "Done\n";
>
>

- 

NOTICE: The information contained in this email and any attachments is 
confidential and may be legally privileged. If you are not the 
intended recipient you are hereby notified that you must not use, 
disclose, distribute, copy, print or rely on this email's content. If 
you are not the intended recipient, please notify the sender 
immediately and then delete the email and any attachments from your 
system.

RNIB has made strenuous efforts to ensure that emails and any 
attachments generated by its staff are free from viruses. However, it 
cannot accept any responsibility for any viruses which are 
transmitted. We therefore recommend you scan all attachments.

Please note that the statements and views expressed in this email 
and any attachments are those of the author and do not necessarily 
represent those of RNIB.

RNIB Registered Charity Number: 226227

Website: http://www.rnib.org.uk 

______________________________________________________________________
Apache Interface to OpenSSL (mod_ssl)                   www.modssl.org
User Support Mailing List                      [EMAIL PROTECTED]
Automated List Manager                            [EMAIL PROTECTED]

Reply via email to