var partition is too small
Jez Hancock
jez.hancock at munk.nu
Fri Oct 3 22:00:08 PDT 2003
On Fri, Oct 03, 2003 at 09:00:43AM -0500, Redmond Militante wrote:
> hi all
>
> the var partition on my apache box may be too small.
> this is a problem because -
> i originally had newsyslog set at
>
> /var/log/httpd-access.log 644 7 100 24 B /var/run/httpd.pid 30
fwiw I have the following entry in /etc/crontab:
0 * * * * root /home/munk/bin/sh/newsyslog.sh
where that script reads:
#!/bin/sh
YEAR=`date "+%Y"`
ROTATE_DIR=/home/munk/backup/log/$YEAR
if [ ! -d $ROTATE_DIR ]
then
mkdir $ROTATE_DIR
fi
/usr/sbin/newsyslog -a $ROTATE_DIR
/usr/sbin/chown -R root:wheel $ROTATE_DIR \
&& /bin/chmod -R 750 $ROTATE_DIR
so the logfiles get rotated out into /home/munk/backup/log/$YEAR with
whatever compression/triggers are setup in /etc/newsyslog.conf.
--
Jez Hancock
- System Administrator / PHP Developer
http://munk.nu/
More information about the freebsd-questions
mailing list