16 lines
322 B
Bash
16 lines
322 B
Bash
#!/bin/bash
|
|
|
|
# Get current date
|
|
TODAY=$(date +%d/%m/%Y)
|
|
|
|
# Get one week ago today
|
|
LASTWEEK=$(date --date "1 week ago" +%d/%m/%Y)
|
|
|
|
mkdir -p /var/www/html/squid-reports/weekly
|
|
|
|
/usr/bin/sarg -f /etc/squid/sarg/sarg.conf -l /var/log/squid/access.log \
|
|
-o /var/www/html/squid-reports/weekly -z -d $LASTWEEK-$TODAY
|
|
|
|
exit 0
|
|
|