Project

General

Profile

Bug #5796 ยป pcap_flood.patch

arehbein, 11/28/2022 09:29 PM

View differences:

ttcn3-tcpdump-start.sh
21 21
kill_rm_pidfile() {
22 22
	# NOTE: This requires you to be root or something like
23 23
	# "laforge ALL=NOPASSWD: /usr/sbin/tcpdump, /bin/kill" in your sudoers file
24
	if ! [ -e "$1" ] && [ -s "$1" ]; then
24
	if [ -e "$1" ] && [ -s "$1" ]; then
25 25
		$SUDOSTR kill "$(cat "$1")" 2>&1 | grep -v "No such process"
26 26
		rm $1
27 27
	fi
ttcn3-tcpdump-stop.sh
16 16
kill_rm_pidfile() {
17 17
	# NOTE: This requires you to be root or something like
18 18
	# "laforge ALL=NOPASSWD: /usr/sbin/tcpdump, /bin/kill" in your sudoers file
19
	if ! [ -e "$1" ] && [ -s "$1" ]; then
19
	if [ -e "$1" ] && [ -s "$1" ]; then
20 20
		$SUDOSTR kill "$(cat "$1")" 2>&1 | grep -v "No such process"
21 21
		rm $1
22 22
	fi
    (1-1/1)
    Add picture from clipboard (Maximum size: 48.8 MB)