310.accounting revision 61981
1#!/bin/sh 2# 3# $FreeBSD: head/etc/periodic/daily/310.accounting 61981 2000-06-23 01:18:31Z brian $ 4# 5 6# If there is a global system configuration file, suck it in. 7# 8if [ -r /etc/defaults/periodic.conf ] 9then 10 . /etc/defaults/periodic.conf 11 source_periodic_confs 12fi 13 14case "$daily_accounting_enable" in 15 [Yy][Ee][Ss]) 16 if [ -f /var/account/acct ] 17 then 18 echo "" 19 echo "Rotating accounting logs and gathering statistics:" 20 21 cd /var/account 22 [ -f acct.2 ] && mv -f acct.2 acct.3 23 [ -f acct.1 ] && mv -f acct.1 acct.2 24 [ -f acct.0 ] && mv -f acct.0 acct.1 25 cp -pf acct acct.0 26 sa -s >/dev/null 27 fi;; 28esac 29