Firewall Wizards mailing list archives

Re: Solaris 2.6 syslod dies on SIGHUP


From: carson () tla org
Date: Mon, 26 Jul 1999 12:34:51 -0400 (EDT)

Ummm... standard log rotation works just fine for me. In POSIX shell,
freehand (so don't blame me for typo's :)

pid=`cat /etc/syslog.pid`
cd /var/log
rm messages.4.gz
for f in 3 2 1 0; do
  mv messages.$f messages.$(($f + 1))
done
# move messages file - syslog still has it open!
mv messages messages.0
# create new file, as syslog won't
touch messages
# SIGHUP syslogd
kill -1 $pid
# syslogd now writing to new file, and the old file should be closed
gzip messages.0

-- 
Carson Gaspar -- carson () cs columbia edu carson () tla org carson () cugc org
http://www.cs.columbia.edu/~carson/home.html
Queen Trapped in a Butch Body



Current thread: