Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Maalepaaler
mp-rude
Commits
82826446
Commit
82826446
authored
Mar 05, 2019
by
Olav Kvittem
Browse files
added start-icmp which runs to midnight
parent
1b359166
Changes
3
Hide whitespace changes
Inline
Side-by-side
build.sh
View file @
82826446
...
...
@@ -8,7 +8,7 @@ apt-get update
apt-get
-y
upgrade
package
=
"mp-rude"
version
=
"1.3.1
0
"
version
=
"1.3.1
1
"
#version=$(git describe|perl -p -e 'chomp;s/v([^-]+)(-(\d+)-g.+)?$/\1+\3/;s/\+$//')
...
...
mp-rude/usr/share/mp-rude/start-icmp
0 → 100755
View file @
82826446
#! /bin/sh
# dump igmp traffic to catch unreachables
.
/etc/mp-rude/start.conf
# pick interface with default route
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
fi
mp-rude/usr/share/mp-rude/start.sh
View file @
82826446
...
...
@@ -18,10 +18,8 @@ for i in $(cat ${traceconf}) ; do
echo
"
$!
"
>>
"
${
pidfile
}
"
done
# start tcpdump
# start tcpdump og icmp
$bin
/start-icmp
IF
=
`
ip route get 158.38.62.1 | perl
-ne
'print $1 if / dev (\w+) /'
`
if
test
"
$IF
"
!=
""
;
then
/usr/sbin/tcpdump
-i
$IF
-G
86399
-W
1
-w
${
logpath
}
/icmp-%F.pcap icmp 2>
${
logpath
}
/icmp.log
fi
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment