From a468d7a57b0e6ee247f0fcb6f8336dc384788e37 Mon Sep 17 00:00:00 2001 From: Ruakij Date: Mon, 29 Nov 2021 09:14:50 +0100 Subject: [PATCH] Start tcpdump process --- src/main.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main.js b/src/main.js index 8fb0a0e..ae6ce01 100644 --- a/src/main.js +++ b/src/main.js @@ -2,6 +2,8 @@ const logger = require("./helper/logger.js")("main"); const { requireEnvVars } = require("./helper/env.js"); const { exit } = require("process"); +const { exec } = require("./helper/exec.js"); + const { InfluxDB } = require('@influxdata/influxdb-client'); const InfluxChecks = require('./helper/influx-checks.js'); @@ -46,4 +48,9 @@ if(errorMsg){ logger.info("Influx ok"); + logger.info("Starting tcpdump.."); + const TCPDUMP_BASECMD = "tcpdump -vvv -e -n -X -s0 -i" + let cmd = `sudo ${TCPDUMP_BASECMD} ${env.WIFI_INTERFACE}`; + + let proc = exec(cmd); })();