public static void PushToServer() { SshHandler.SendCommand(SshHandler.stream, "pkill gdwc"); SshHandler.SendCommand(SshHandler.stream, "rm -rf ~/gdwc"); SshHandler.SendCommand(SshHandler.stream, "mkdir gdwc"); SshHandler.SendCommand(SshHandler.stream, "cd ~/gdwc"); if (File.Exists("./Build/Server/gdwc.zip")) { SshHandler.sendFile("./Build/Server/gdwc.zip"); } else { Debug.LogError("File \"./Build/Server/gdwc.zip\" not found! Build first."); } }
public static void StopServer() { SshHandler.SendCommand(SshHandler.stream, "pkill gdwc"); Debug.Log("Server stopped"); }
public static void StartServer() { SshHandler.SendCommand(SshHandler.stream, "cd ~/gdwc"); SshHandler.SendCommand(SshHandler.stream, "nohup ./gdwc.x86_64 &"); Debug.Log("Server started"); }