Commit 77ada111 authored by Olav Kvittem's avatar Olav Kvittem

added time to log-file so you can have multiple per day

parent 82826446
......@@ -7,5 +7,5 @@
IF=`ip route get 158.38.62.1 | perl -ne 'print $1 if / dev (\w+) /'`
if test "$IF" != ""; then
tomidnight=$((`date --date 'tomorrow 00:00' +%s`-`date +%s` - 1))
/usr/sbin/tcpdump -i $IF -G $tomidnight -W 1 -w ${logpath}/icmp-%F.pcap icmp 2> ${logpath}/icmp.log
/usr/sbin/tcpdump -i $IF -G $tomidnight -W 1 -w ${logpath}/icmp-%F-%T.pcap icmp 2> ${logpath}/icmp.log
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment