#!/usr/local/bin/bash # # UPDATE-LOGS-ONLY # # to be run from a crontab every hour (or whatever) to update admin statistics # # # crontab example: # 2 * * * * /root/mrtg/admin/UPDATE-LOGS-ONLY >/dev/null 2>&1 # # would run it every hour at two minutes after the hour for i in `ls -1 /root/mrtg/mrtg-users/ |grep cfg | awk -F"." '{print $1}'`; do cp /home/$i/public_html/traffic/useraccounting.log /home/adminuser/public_html/traffic/admin/$i.log; done