Skip to content

Commit d11ebc0

Browse files
authored
Merge pull request #447 from cglewis/445
checks if tracecapd succeeded
2 parents d8d8dd5 + cc5a369 commit d11ebc0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

network_tap/ncapture/run.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#!/bin/bash
2-
set -e
32

43
URI="$1"
54
INTERVAL="$2"
@@ -76,6 +75,11 @@ run_tracecapd() {
7675
echo -e "format: pcapfile\nnamingscheme: ${name}\ncompressmethod: none\nrotationperiod: day\n" > $dwconf
7776
echo -e "anon: $ANON\nchecksum: $CSUM\npayload: $PAYS\ndnspayload: $DPAYS\n" > $ppconf
7877
timeout --preserve-status -k2 ${interval}s tracecapd -t 1 -c $dwconf -p $ppconf -s $uri -f "$filter"
78+
status=$?
79+
if [ $status != 0 ]; then
80+
python3 send_message.py -1;
81+
exit 1
82+
fi
7983
}
8084

8185
run_capture() {

0 commit comments

Comments
 (0)