From a1472a9f23448b3797dc2a3cc4af9132f03fa824 Mon Sep 17 00:00:00 2001
From: Someone <someone@somenet.org>
Date: Thu, 19 Nov 2015 20:52:50 +0100
Subject: [PATCH] Script to (re)start network dumps.

---
 netdump_restart.sh | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
 create mode 100755 netdump_restart.sh

diff --git a/netdump_restart.sh b/netdump_restart.sh
new file mode 100755
index 0000000..6b8a95f
--- /dev/null
+++ b/netdump_restart.sh
@@ -0,0 +1,24 @@
+#!/bin/bash
+#
+# Copyright 2015-2016 by Jan Vales <jan@jvales.net> (Someone <someone@somenet.org>)
+# send me your changes. credit author(s). do not publish. share alike.
+# to be done: find a suitable licence text.
+#
+# Script to (re)start dumping the relevant network streams.
+#
+
+export NETDUMPDIR="/media/sf_vmshare/_netdumps/raw/"
+
+mkdir -p "${NETDUMPDIR}"
+
+killall tcpdump
+
+echo "starting tmux"
+
+tmux new-session -s "netdump" -d "zsh"
+tmux new-window -d "echo 'starting at: $(date -Iseconds)' && /usr/sbin/tcpdump -v -i nflog:1 -G 300 -w '${NETDUMPDIR}/accepted_%F_%H-%M-%S.pcap'"
+tmux new-window -d "echo 'starting at: $(date -Iseconds)' && /usr/sbin/tcpdump -v -i nflog:2 -G 300 -w '${NETDUMPDIR}/dropped_%F_%H-%M-%S.pcap'"
+tmux new-window -d "echo 'starting at: $(date -Iseconds)' && /usr/sbin/tcpdump -v -i game -G 300 -w '${NETDUMPDIR}/test_all_%F_%H-%M-%S.pcap'"
+
+tmux attach
+
-- 
2.43.0