added tcpdump check to print a message about its requirement
This commit is contained in:
parent
0aa7c6f1f2
commit
87f90cd8e3
1 changed files with 6 additions and 1 deletions
|
@ -11,6 +11,7 @@ from queue import Queue
|
|||
from threading import Thread
|
||||
from typing import Dict, Tuple
|
||||
|
||||
from core import utils
|
||||
from core.api.grpc.client import CoreGrpcClient
|
||||
from core.api.grpc.core_pb2 import NodeType
|
||||
|
||||
|
@ -172,6 +173,10 @@ class RouterMonitor:
|
|||
|
||||
|
||||
def main() -> None:
|
||||
if not utils.which("tcpdump", required=False):
|
||||
print("core-route-monitor requires tcpdump to be installed")
|
||||
return
|
||||
|
||||
parser = argparse.ArgumentParser(
|
||||
description="core route monitor",
|
||||
formatter_class=ArgumentDefaultsHelpFormatter,
|
||||
|
@ -200,7 +205,7 @@ def main() -> None:
|
|||
monitor.start()
|
||||
except KeyboardInterrupt:
|
||||
monitor.stop()
|
||||
print("ending packet monitor")
|
||||
print("ending route monitor")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
Loading…
Reference in a new issue