From 9268fa8b01f2c805bcad8bcac879ecc4383025de Mon Sep 17 00:00:00 2001 From: MagicBot Date: Mon, 9 Jan 2023 01:39:14 -0500 Subject: [PATCH] Using ProcessBuilding instead of exec() --- src/discord/handlers/DevRequestHandler.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/discord/handlers/DevRequestHandler.java b/src/discord/handlers/DevRequestHandler.java index 69e040cf..aec38f01 100644 --- a/src/discord/handlers/DevRequestHandler.java +++ b/src/discord/handlers/DevRequestHandler.java @@ -41,16 +41,16 @@ public class DevRequestHandler { switch (serverCommand) { case "build" : - commandString = "mbdevbuild.sh"; + commandString = "./mbdevbuild.sh"; break; case "restart": - commandString = "mbdevrestart.sh"; + commandString = "./mbdevrestart.sh"; break; case "debug": - commandString = "mbdevdebug.sh"; + commandString = "./mbdevdebug.sh"; break; case "shutdown": - commandString = "mbdevkill.sh"; + commandString = "./mbdevkill.sh"; break; default: break; @@ -58,7 +58,7 @@ public class DevRequestHandler { if (commandString.isEmpty() == false) { - processBuilder = new ProcessBuilder("sh", "-c", commandString, commandArgument); + processBuilder = new ProcessBuilder("/bin/sh", "-c", commandString, commandArgument); try { processBuilder.start(); } catch (IOException e) {