add barebones dispatch command
This commit is contained in:
parent
f672c6c706
commit
8542ea2ef7
1 changed files with 9 additions and 0 deletions
|
|
@ -29,6 +29,15 @@ def scan():
|
||||||
|
|
||||||
@app.route("/dispatch")
|
@app.route("/dispatch")
|
||||||
def dispatch():
|
def dispatch():
|
||||||
|
command = ["bash", f"{os.getcwd()}/scanbuddy.bash", "dispatch"]
|
||||||
|
user = request.args.get("user", "")
|
||||||
|
|
||||||
|
result = subprocess.run(command, stdout=subprocess.PIPE, text=True)
|
||||||
|
output = result.stdout.strip()
|
||||||
|
|
||||||
|
print("Scanbuddy output: ")
|
||||||
|
print(output)
|
||||||
|
|
||||||
return "Dispatching..."
|
return "Dispatching..."
|
||||||
|
|
||||||
@app.route("/unscan")
|
@app.route("/unscan")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue