1#!/bin/sh 2# 19.2.2010, Sampo Kellomaki (sampo@iki.fi) 3# Clean away audit trail (looses audit trail, but saves space) 4# 5# Usage: ./zxcleanlogs.sh # By default cleans /var/zxid/ 6# ./zxcleanlogs.sh /var/zxid/idp 7 8warning="WARNING: Running this script (zxcleanlogs.sh) in production environment 9 will destroy valuable audit trail data, which you may be legally obliged 10 to retain. Be sure any such data has already been copied to a safe place. 11 12 You should use zxlogclean.sh instead as it provides sane options to 13 preserve the audit trail. 14" 15 16echo $warning 17 18ZXID_PATH=$1 19if [ "x$ZXID_PATH" = "x" ] ; then ZXID_PATH=/var/zxid/; fi 20 21ZXDEL='ses/* log/act log/err log/rely/* log/issue/* tmp/*' 22 23for d in $ZXDEL; do 24 echo $ZXID_PATH$d 25 rm -rf $ZXID_PATH$d 26done 27 28#EOF