diff --git a/Dockerfile b/Dockerfile index 98ec383..ff467e9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,11 @@ WORKDIR /usr/src/app COPY package*.json ./ RUN npm install +RUN apt-get update +RUN apt-get -y install \ + tcpdump + # Bundle app source COPY ./src/ . -CMD ["npm", "run"] \ No newline at end of file +CMD ["npm", "run", "start"] \ No newline at end of file diff --git a/package.json b/package.json index 4f3a8dd..309915b 100644 --- a/package.json +++ b/package.json @@ -2,10 +2,10 @@ "name": "rfmon-to-influx", "version": "1.0.0", "description": "Writing (mostly meta-) data received in Wireless-Monitor-Mode into an InfluxDB", - "main": "src/main.js", + "main": "main.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", - "start": "node src/main.js" + "start": "node main.js" }, "repository": { "type": "git", diff --git a/src/main.js b/src/main.js index 3726245..9e6fd77 100644 --- a/src/main.js +++ b/src/main.js @@ -56,7 +56,7 @@ if(errorMsg){ logger.info("Starting tcpdump.."); const TCPDUMP_BASECMD = "tcpdump -vvv -e -n -X -s0 -i" - let cmd = `sudo ${TCPDUMP_BASECMD} ${env.WIFI_INTERFACE}`; + let cmd = `${TCPDUMP_BASECMD} ${env.WIFI_INTERFACE}`; let proc = exec(cmd); logger.debug("Creating & Attaching streams..");