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")
|
||||
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..."
|
||||
|
||||
@app.route("/unscan")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue