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=/usr/local CONF=/usr/local/etc -SHELL=/bin/sh +SHELL=/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. -- René 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/