diff options
author | brian <brian@FreeBSD.org> | 2000-06-25 08:59:26 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 2000-06-25 08:59:26 +0000 |
commit | 0ef3538e304bd3aeb47de24e7b72f679ac6bf7a9 (patch) | |
tree | 60ad4170660df083f624d79ca6a83f030b97a2b5 /etc/periodic | |
parent | c46e65268d46deb39e14305f985392ab802dcf50 (diff) | |
download | FreeBSD-src-0ef3538e304bd3aeb47de24e7b72f679ac6bf7a9.zip FreeBSD-src-0ef3538e304bd3aeb47de24e7b72f679ac6bf7a9.tar.gz |
Allow compressed acct files
PR: 19483
Submitted by: Ben Smithurst <ben@scientia.demon.co.uk>
Diffstat (limited to 'etc/periodic')
-rwxr-xr-x | etc/periodic/daily/310.accounting | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/etc/periodic/daily/310.accounting b/etc/periodic/daily/310.accounting index 15e5c6d..2baf232 100755 --- a/etc/periodic/daily/310.accounting +++ b/etc/periodic/daily/310.accounting @@ -19,10 +19,20 @@ case "$daily_accounting_enable" in echo "Rotating accounting logs and gathering statistics:" cd /var/account + + rm -f acct.3.gz acct.3 + [ -f acct.2.gz ] && mv -f acct.2.gz acct.3.gz [ -f acct.2 ] && mv -f acct.2 acct.3 + [ -f acct.1.gz ] && mv -f acct.1.gz acct.2.gz [ -f acct.1 ] && mv -f acct.1 acct.2 + [ -f acct.0.gz ] && mv -f acct.0.gz acct.1.gz [ -f acct.0 ] && mv -f acct.0 acct.1 cp -pf acct acct.0 sa -s >/dev/null + + case "$daily_accounting_compress" in + [Yy][Ee][Ss]) + gzip -f acct.0;; + esac fi;; esac |