Commit 36909c25 authored by Simon Redman's avatar Simon Redman

Correctly launch ospf sniffer so that it can be correctly killed

parent 2f64b9cf
......@@ -71,7 +71,7 @@ def _generate_start_command(path:str=DEFAULT_CLONE_PATH,
:param pidfile: File to which the PID will be written
return "pushd {path}; ./ {executable} --controller={controller} --port={port} --log-file={logfile} & echo $! > {pidfile} && disown; popd".format(
return "pushd {path}; source env/bin/activate; sudo $(which python) {executable} --controller={controller} --port={port} --log-file={logfile} & echo $! > {pidfile} && disown; deactivate; popd".format(
......@@ -81,7 +81,7 @@ def _generate_start_command(path:str=DEFAULT_CLONE_PATH,
def _generate_stop_command(pidfile: str=DEFAULT_PIDFILE) -> str:
return "kill $(cat {pidfile}); rm -f {pidfile}".format(pidfile=pidfile)
return "sudo kill $(cat {pidfile}); rm -f {pidfile}".format(pidfile=pidfile)
def clone_repo_on_network(graph: networkx.Graph,
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment