Listing 1: runacct.local
#!/sbin/sh
MONTH="`date +'%m'`"
YEAR="`date +'%Y'`"
DATE="`date +%m%d`"
TIME="`date +'%H''%M'`"
SUMDIR=/var/adm/acct/sum/${YEAR}${DATE}
mkdir ${SUMDIR}
cp ${_adm}/Spacct*.${_date} ${SUMDIR}
cp ${_adm}/wtmpx ${SUMDIR}
cp ${_sum}/tacct${_date} \
${SUMDIR}/tacct${YEAR}${DATE}
mv ${_nite}/daycms $SUMDIR/cmsrpt
mv ${_sum}/daycms $SUMDIR/cmsdata
|