This commit is contained in:
Master Kwoth
2017-10-28 14:20:08 +02:00
parent e25ded9e24
commit 58d0635658
3 changed files with 16 additions and 11 deletions

View File

@ -76,10 +76,20 @@ namespace NadekoBot.Core.Services.Impl
if (!string.IsNullOrWhiteSpace(cmd))
RestartCommand = new RestartConfig(cmd, args);
if (string.IsNullOrWhiteSpace(ShardRunCommand))
ShardRunCommand = "dotnet";
if (string.IsNullOrWhiteSpace(ShardRunArguments))
ShardRunArguments = "run -c Release -- {0} {1}";
if (Environment.OSVersion.Platform == PlatformID.Unix)
{
if (string.IsNullOrWhiteSpace(ShardRunCommand))
ShardRunCommand = "dotnet";
if (string.IsNullOrWhiteSpace(ShardRunArguments))
ShardRunArguments = "run -c Release -- {0} {1}";
}
else //windows
{
if (string.IsNullOrWhiteSpace(ShardRunCommand))
ShardRunCommand = "NadekoBot.exe";
if (string.IsNullOrWhiteSpace(ShardRunArguments))
ShardRunArguments = "{0} {1}";
}
var portStr = data[nameof(ShardRunPort)];
if (string.IsNullOrWhiteSpace(portStr))

View File

@ -293,6 +293,8 @@ namespace NadekoBot.Core.Services
private Process StartShard(int shardId)
{
Console.WriteLine(_creds.ShardRunCommand);
Console.WriteLine(_creds.ShardRunArguments);
return Process.Start(new ProcessStartInfo()
{
FileName = _creds.ShardRunCommand,