String bashCommand = "/home/go/script/restart_go.sh"; //①
Runtime runtime = Runtime.getRuntime();
Process pro = runtime.exec(bashCommand); //②
int status = pro.waitFor(); //③
if (status != 0){ //④
logger.error("restart go server error");
return;
}
logger.info("restart go server success");