Catch start-error from tcpdump
tcpdump writes to stderr at the beginning
This commit is contained in:
parent
45a11753de
commit
c27761322c
@ -71,6 +71,7 @@ if(errorMsg){
|
|||||||
logger.debug("Attaching error-logger..");
|
logger.debug("Attaching error-logger..");
|
||||||
const loggerTcpdump = logFactory("tcpdump");
|
const loggerTcpdump = logFactory("tcpdump");
|
||||||
proc.stderr.setEncoding("utf8").on("data", (data) => {
|
proc.stderr.setEncoding("utf8").on("data", (data) => {
|
||||||
|
if(!data.match(/^(tcpdump: )?listening on /i)) // Catch start-error
|
||||||
loggerTcpdump.error(data);
|
loggerTcpdump.error(data);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user