Commit 7e20f4a2 authored by Simon Redman's avatar Simon Redman

Update sniffer configurator for env-based launch

parent 07b01cf9
......@@ -35,7 +35,11 @@ DEFAULT_REPO_URL="https://gitlab.flux.utah.edu/safeedge/ospfv3_monitor.git"
def _generate_repo_clone_command(repo: str, branch: str, path: str) -> str:
return "git clone -b {branch} --single-branch -- {repo} {path}".format(repo=repo, branch=branch, path=path)
return "git clone -b {branch} --single-branch -- {repo} {path};" \
"pushd {path};" \
"virtualenv -p /usr/bin/python2 env && env/bin/activate;" \
"pip install -r requirements.txt;" \
"popd;".format(repo=repo, branch=branch, path=path)
def _generate_repo_update_command(path: str) -> str:
......@@ -62,7 +66,7 @@ def _generate_start_command(path:str=DEFAULT_CLONE_PATH,
:param pidfile: File to which the PID will be written
:return:
"""
return "sudo {path}/{executable} --controller={controller} --port={port} 1> {logfile} & echo $! > {pidfile} && disown".format(
return "{path}/python-sudo.sh {path}/{executable} --controller={controller} --port={port} 1> {logfile} & echo $! > {pidfile} && disown".format(
path=path,
executable=executable,
controller=controller,
......
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