From 8542ea2ef7d1cf989aa65b420f914f42334e1a0a Mon Sep 17 00:00:00 2001 From: Prunebutt Date: Fri, 26 Sep 2025 00:28:32 +0200 Subject: [PATCH] add barebones dispatch command --- server.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/server.py b/server.py index 0259f6f..ba2632b 100755 --- a/server.py +++ b/server.py @@ -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")