Professional Documents
Culture Documents
Solar Is Log File Rotation
Solar Is Log File Rotation
/bin/sh
#
# Program: Logfile rotation utility <logrotate.sh>
#
#
# Current Version: 1.0
#
# Revision History:
#
# Version 1.0
# Original release
#
# Last Updated: 10-09-2005
#
# Purpose:
# This script will rotate the logfiles listed in the LOG variable. COUNT vopies
# will be maintained.
#
# Trap signals sent when we are moving files so we don't get interrupted
trap '' 0 1 2 3 9 15
# GLOBAL VARIABLES
COUNT=10
LOGS="/var/adm/messages /var/log/syslog /var/log/maillog /var/log/openldap"
STOPVALUE=0
# Restart syslog
/etc/init.d/syslog stop && /etc/init.d/syslog start