initial commit of file from CVS for smeserver-awstats on Sat Sep 7 20:09:28 AEST 2024

This commit is contained in:
Trevor Batley
2024-09-07 20:09:28 +10:00
parent 2ac31e7de4
commit 4e37dd65ac
29 changed files with 3907 additions and 2 deletions

View File

@@ -0,0 +1,14 @@
#!/bin/bash
# Qmail logfile preprocessor
/usr/bin/test $(/bin/ls -l /var/log/qmail/*.s 2>/dev/null | grep -v "^l" | wc -l) -eq 0 && /bin/touch /var/log/qmail/awstats_dummy.s
RR=$(/bin/ls -t /var/log/qmail/*.s|/usr/bin/head -n 1)
RR=$(/bin/basename $RR)
/usr/bin/test ! -f /var/log/qmail/.recent-rotated && SRC="/var/log/qmail/*.s" && echo $RR > /var/log/qmail/.recent-rotated
LR=$(/bin/cat /var/log/qmail/.recent-rotated)
echo "RR: $RR LR: $LR"
/usr/bin/test "$LR" != "$RR" && SRC="/var/log/qmail/$RR" && echo $RR > /var/log/qmail/.recent-rotated
/bin/cat $SRC /var/log/qmail/current | /usr/local/bin/tai64nlocal | /usr/bin/perl /usr/share/awstats/tools/maillogconvert.pl standard | /bin/grep -v ' alias-localdelivery-'
/bin/rm -f /var/log/qmail/awstats_dummy.s