X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-0.8 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_43,RCVD_IN_DNSWL_LOW,RCVD_NUMERIC_HELO,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com From: =?ISO-8859-1?Q?Ren=E9_Berber?= Subject: Re: log rotation Date: Tue, 20 Jan 2009 15:59:29 -0600 Lines: 51 Message-ID: References: <10edf5d8ef75 DOT 4975d0ed AT sasktel DOT net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) In-Reply-To: <10edf5d8ef75.4975d0ed@sasktel.net> X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Jody Burnett wrote: > I have sshd running and would like to setup rotation for these > logs....I have syslog-ng writing to the messages log. Can anyone > point me to a program like logrotate for cygwin or is there a cygwin > package? I have cron running so if there is a bash or perl script I > can run that would be great. I have searched for a simple script to > do this but cannot find an answer. I'm using rotatelog version 1.7, the only changes I made to the provided Makefile are: --- Projects/rotatelog-1.7/Makefile~ 2001-05-27 13:38:54.000000000 -0500 +++ Projects/rotatelog-1.7/Makefile 2006-04-04 13:30:50.890625000 -0500 @@ -1,15 +1,15 @@ PREFIX=3D/usr/local CONF=3D/usr/local/etc -SHELL=3D/bin/sh +SHELL=3D/bin/bash -install: +install : FORCE mkdir -p ${PREFIX}/sbin cp rotatelog ${PREFIX}/sbin - chown root:bin ${PREFIX}/sbin/rotatelog +# chown root:bin ${PREFIX}/sbin/rotatelog chmod 0700 ${PREFIX}/sbin/rotatelog mkdir -p ${PREFIX}/man/man1 cp rotatelog.1 ${PREFIX}/man/man1 - chown root:bin ${PREFIX}/man/man1/rotatelog.1 +# chown root:bin ${PREFIX}/man/man1/rotatelog.1 chmod 0444 ${PREFIX}/man/man1/rotatelog.1 @if [ -f ${CONF}/rotatelog.conf ] ;\ then \ @@ -18,7 +18,8 @@ else \ mkdir -p ${CONF} ;\ cp rotatelog.conf ${CONF} ;\ - chown root:bin ${CONF}/rotatelog.conf ;\ chmod 0644 ${CONF}/rotatelog.conf ;\ echo "Copied example rotatelog.conf to ${CONF}." ;\ fi + +FORCE : Logrotate should also work, I didn't try on Cygwin but I use it on Linux, rotate log is just simple and does the job fine. --=20 Ren=E9 Berber -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/