#!/bin/sh

###
### Dieses Skript komprimiert alle Accountingdaten.
### Aufruf: Einmal pro Monat (oder auch pro Woche) via Cron.
###

set -e

. ${POPHOME:-@POPHOME@}/lib/pop_conf_sh

cd $LOGFILES

find . -type f | while read i ; do
	case "$i" in
	   *.x)
			;;
	   *.gz)
			;;
	   *)
			if test -s "$i" && gzip <"$i" >>"$i".gz ; then
				rm -f $i
			fi
			;;
	esac
done

exit 0
