#!/bin/sh
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export PATH
# NOTE: Change this value to the full path of
# the directory where the log files are contained.
PROXYDIR=/your/proxy/directory
# Rotate the old logs
rm -f ${PROXYDIR}/log.txt.4
mv ${PROXYDIR}/log.txt.3 ${PROXYDIR}/log.txt.4
mv -f ${PROXYDIR}/log.txt.2 ${PROXYDIR}/log.txt.3
cp ${PROXYDIR}/log.txt ${PROXYDIR}/log.txt.2
# Clear out the active logfile to start fresh
cat /dev/null > ${PROXYDIR}/log.txt
Happy now?