sarg/sarg-crond.daily

14 lines
276 B
Bash

#!/bin/bash
# Get current date
TODAY=$(date +%d/%m/%Y)
# Get one day ago today
YESTERDAY=$(date --date "1 day ago" +%d/%m/%Y)
/usr/bin/sarg -f /etc/squid/sarg/sarg.conf -l /var/log/squid/access.log \
-o /var/www/html/squid-reports/daily -z -d $YESTERDAY-$TODAY
exit 0