#! /bin/sh

# PLEASE NOTE!!!
#
# /var/log/nmb and /var/log/smb will grow until they have reached
#	they size especified in /etc/samba/smb.conf, "max log size" parameter.
#	The sample smb.conf that gets installed with samba-common sets this
#	parameter to 1 MByte. After the log files have reached this size, nmbd
#	or smbd rename their log file to nmb.old and smb.old, and create new
#	log file with the names nmb and smb. Here we rotate the .old files,
#	not the nmb or smb files because Samba keeps them open!!! You have been
#	warned!
#
# Also, we rotate the .old files only if the .old files exist and their sizes
#	are different than 0 bytes.
#

if [ -s /var/log/nmb.old -o -s /var/log/smb.old ]; then
	savelog /var/log/nmb.old > /dev/null
	savelog /var/log/smb.old > /dev/null
fi
