update runmailstats.sh for new log names
This commit is contained in:
parent
a20b570e11
commit
51dd523249
9
root/usr/bin/runmailstats.sh
Executable file → Normal file
9
root/usr/bin/runmailstats.sh
Executable file → Normal file
@ -1,15 +1,16 @@
|
||||
#!/bin/bash
|
||||
#exec 1> >(logger -t $(basename $0)) 2>&1
|
||||
perl /usr/bin/mailstats.pl /var/log/qpsmtpd/*.log /var/log/sqpsmtpd/*.log /var/log/uqpsmtpd/*.log
|
||||
perl /usr/bin/mailstats.pl /var/log/qpsmtpd/*.log /var/log/sqpsmtpd/*.log /var/log/uqpsmtpd/*.log \
|
||||
/var/log/qpsmtpd/qpsmtpd.log-???????? /var/log/sqpsmtpd/qpsmtpd.log-???????? /var/log/qpsmtpd/uqpsmtpd.log-????????
|
||||
# and run new python one - start by copying and decoding log files
|
||||
yesterday_date=$(date -d "yesterday" +'%b %d')
|
||||
echo $yesterday_date
|
||||
cd /var/log/qpsmtpd
|
||||
cat *.log >/opt/mailstats/logs/current1 2>/dev/null
|
||||
cat *.log qpsmtpd.log-???????? >/opt/mailstats/logs/current1 2>/dev/null
|
||||
cd /var/log/sqpsmtpd
|
||||
cat *.log >/opt/mailstats/logs/current2 2>/dev/null
|
||||
cat *.log sqpsmtpd.log-???????? >/opt/mailstats/logs/current2 2>/dev/null
|
||||
cd /var/log/uqpsmtpd
|
||||
cat *.log >/opt/mailstats/logs/current3 2>/dev/null
|
||||
cat *.log uqpsmtpd.log-???????? >/opt/mailstats/logs/current3 2>/dev/null
|
||||
cd /opt/mailstats/logs
|
||||
cat current1 current2 current3 2>/dev/null | grep "$yesterday_date" > current.log
|
||||
ls -l
|
||||
|
Loading…
Reference in New Issue
Block a user