Browse Source

Using ProcessBuilding instead of exec()

master
MagicBot 2 years ago
parent
commit
9268fa8b01
  1. 10
      src/discord/handlers/DevRequestHandler.java

10
src/discord/handlers/DevRequestHandler.java

@ -41,16 +41,16 @@ public class DevRequestHandler { @@ -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 { @@ -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) {

Loading…
Cancel
Save