mirror of
https://github.com/tribufu/ServerManagers
synced 2026-06-01 09:42:39 +00:00
Added better status detection for stopping servers
This commit is contained in:
parent
034a6228d7
commit
3c822fa982
14 changed files with 183 additions and 46 deletions
|
|
@ -256,6 +256,8 @@ namespace ServerManagerTool.Lib
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ServerStatusChangeCallback?.Invoke(ServerStatus.Stopped);
|
||||||
|
|
||||||
// make a backup of the current profile and config files.
|
// make a backup of the current profile and config files.
|
||||||
CreateProfileBackupArchiveFile(_profile);
|
CreateProfileBackupArchiveFile(_profile);
|
||||||
|
|
||||||
|
|
@ -408,6 +410,7 @@ namespace ServerManagerTool.Lib
|
||||||
}
|
}
|
||||||
|
|
||||||
_serverRunning = true;
|
_serverRunning = true;
|
||||||
|
ServerStatusChangeCallback?.Invoke(ServerStatus.Stopping);
|
||||||
LogProfileMessage($"Server process found PID {process.Id}.");
|
LogProfileMessage($"Server process found PID {process.Id}.");
|
||||||
|
|
||||||
QueryMaster.Server gameServer = null;
|
QueryMaster.Server gameServer = null;
|
||||||
|
|
@ -1207,6 +1210,8 @@ namespace ServerManagerTool.Lib
|
||||||
if (ExitCode != EXITCODE_NORMALEXIT)
|
if (ExitCode != EXITCODE_NORMALEXIT)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
ServerStatusChangeCallback?.Invoke(ServerStatus.Stopped);
|
||||||
|
|
||||||
emailMessage.AppendLine("Update Summary:");
|
emailMessage.AppendLine("Update Summary:");
|
||||||
emailMessage.AppendLine();
|
emailMessage.AppendLine();
|
||||||
emailMessage.AppendLine($"Server Manager version: {App.Instance.Version}");
|
emailMessage.AppendLine($"Server Manager version: {App.Instance.Version}");
|
||||||
|
|
@ -2542,7 +2547,7 @@ namespace ServerManagerTool.Lib
|
||||||
_loggerBranch?.Info(message);
|
_loggerBranch?.Info(message);
|
||||||
|
|
||||||
if (includeProgressCallback)
|
if (includeProgressCallback)
|
||||||
ProgressCallback?.Invoke(0, $"[INFO] {message}");
|
ProgressCallback?.Invoke(0, $"{message}");
|
||||||
|
|
||||||
Debug.WriteLine($"[INFO] (Branch {GetBranchName(branchName) ?? "unknown"}) {message}");
|
Debug.WriteLine($"[INFO] (Branch {GetBranchName(branchName) ?? "unknown"}) {message}");
|
||||||
}
|
}
|
||||||
|
|
@ -2567,7 +2572,7 @@ namespace ServerManagerTool.Lib
|
||||||
_loggerProfile?.Info(message);
|
_loggerProfile?.Info(message);
|
||||||
|
|
||||||
if (includeProgressCallback)
|
if (includeProgressCallback)
|
||||||
ProgressCallback?.Invoke(0, $"[INFO] {message}");
|
ProgressCallback?.Invoke(0, $"{message}");
|
||||||
|
|
||||||
Debug.WriteLine($"[INFO] (Profile {_profile?.ProfileName ?? "unknown"}) {message}");
|
Debug.WriteLine($"[INFO] (Profile {_profile?.ProfileName ?? "unknown"}) {message}");
|
||||||
}
|
}
|
||||||
|
|
@ -2816,6 +2821,8 @@ namespace ServerManagerTool.Lib
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ServerStatusChangeCallback?.Invoke(ServerStatus.Unknown);
|
||||||
|
|
||||||
LogProfileMessage("");
|
LogProfileMessage("");
|
||||||
LogProfileMessage($"Exitcode = {ExitCode}");
|
LogProfileMessage($"Exitcode = {ExitCode}");
|
||||||
return ExitCode;
|
return ExitCode;
|
||||||
|
|
@ -2913,6 +2920,8 @@ namespace ServerManagerTool.Lib
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ServerStatusChangeCallback?.Invoke(ServerStatus.Unknown);
|
||||||
|
|
||||||
LogProfileMessage("");
|
LogProfileMessage("");
|
||||||
LogProfileMessage($"Exitcode = {ExitCode}");
|
LogProfileMessage($"Exitcode = {ExitCode}");
|
||||||
return ExitCode;
|
return ExitCode;
|
||||||
|
|
@ -2993,6 +3002,8 @@ namespace ServerManagerTool.Lib
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ServerStatusChangeCallback?.Invoke(ServerStatus.Unknown);
|
||||||
|
|
||||||
LogProfileMessage("");
|
LogProfileMessage("");
|
||||||
LogProfileMessage($"Exitcode = {ExitCode}");
|
LogProfileMessage($"Exitcode = {ExitCode}");
|
||||||
return ExitCode;
|
return ExitCode;
|
||||||
|
|
|
||||||
|
|
@ -275,20 +275,32 @@ namespace ServerManagerTool.Lib
|
||||||
|
|
||||||
case WatcherServerStatus.RunningLocalCheck:
|
case WatcherServerStatus.RunningLocalCheck:
|
||||||
if (oldStatus != ServerStatus.Stopping)
|
if (oldStatus != ServerStatus.Stopping)
|
||||||
|
{
|
||||||
UpdateServerStatus(ServerStatus.Running, this.Availability != AvailabilityStatus.Available ? AvailabilityStatus.Waiting : this.Availability, oldStatus != ServerStatus.Running && oldStatus != ServerStatus.Unknown);
|
UpdateServerStatus(ServerStatus.Running, this.Availability != AvailabilityStatus.Available ? AvailabilityStatus.Waiting : this.Availability, oldStatus != ServerStatus.Running && oldStatus != ServerStatus.Unknown);
|
||||||
if (this.ProfileSnapshot.MOTDIntervalEnabled && this.motdIntervalTimer != null && !this.motdIntervalTimer.Enabled) this.motdIntervalTimer.Start();
|
if (this.ProfileSnapshot.MOTDIntervalEnabled && this.motdIntervalTimer != null && !this.motdIntervalTimer.Enabled) this.motdIntervalTimer.Start();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if (this.motdIntervalTimer != null && this.motdIntervalTimer.Enabled) this.motdIntervalTimer.Stop();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WatcherServerStatus.RunningExternalCheck:
|
case WatcherServerStatus.RunningExternalCheck:
|
||||||
if (oldStatus != ServerStatus.Stopping)
|
if (oldStatus != ServerStatus.Stopping)
|
||||||
|
{
|
||||||
UpdateServerStatus(ServerStatus.Running, AvailabilityStatus.Waiting, oldStatus != ServerStatus.Running && oldStatus != ServerStatus.Unknown);
|
UpdateServerStatus(ServerStatus.Running, AvailabilityStatus.Waiting, oldStatus != ServerStatus.Running && oldStatus != ServerStatus.Unknown);
|
||||||
if (this.ProfileSnapshot.MOTDIntervalEnabled && this.motdIntervalTimer != null && !this.motdIntervalTimer.Enabled) this.motdIntervalTimer.Start();
|
if (this.ProfileSnapshot.MOTDIntervalEnabled && this.motdIntervalTimer != null && !this.motdIntervalTimer.Enabled) this.motdIntervalTimer.Start();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if (this.motdIntervalTimer != null && this.motdIntervalTimer.Enabled) this.motdIntervalTimer.Stop();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WatcherServerStatus.Published:
|
case WatcherServerStatus.Published:
|
||||||
if (oldStatus != ServerStatus.Stopping)
|
if (oldStatus != ServerStatus.Stopping)
|
||||||
|
{
|
||||||
UpdateServerStatus(ServerStatus.Running, AvailabilityStatus.Available, oldStatus != ServerStatus.Running && oldStatus != ServerStatus.Unknown);
|
UpdateServerStatus(ServerStatus.Running, AvailabilityStatus.Available, oldStatus != ServerStatus.Running && oldStatus != ServerStatus.Unknown);
|
||||||
if (this.ProfileSnapshot.MOTDIntervalEnabled && this.motdIntervalTimer != null && !this.motdIntervalTimer.Enabled) this.motdIntervalTimer.Start();
|
if (this.ProfileSnapshot.MOTDIntervalEnabled && this.motdIntervalTimer != null && !this.motdIntervalTimer.Enabled) this.motdIntervalTimer.Start();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if (this.motdIntervalTimer != null && this.motdIntervalTimer.Enabled) this.motdIntervalTimer.Stop();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
@ -977,7 +989,23 @@ namespace ServerManagerTool.Lib
|
||||||
|
|
||||||
public void UpdateServerStatus(ServerStatus serverStatus, bool sendAlert)
|
public void UpdateServerStatus(ServerStatus serverStatus, bool sendAlert)
|
||||||
{
|
{
|
||||||
UpdateServerStatus(serverStatus, Availability, sendAlert);
|
var availability = Availability;
|
||||||
|
|
||||||
|
switch (serverStatus)
|
||||||
|
{
|
||||||
|
case ServerStatus.Stopped:
|
||||||
|
case ServerStatus.Stopping:
|
||||||
|
case ServerStatus.Uninstalled:
|
||||||
|
case ServerStatus.Updating:
|
||||||
|
availability = AvailabilityStatus.Unavailable;
|
||||||
|
break;
|
||||||
|
case ServerStatus.Unknown:
|
||||||
|
availability = AvailabilityStatus.Unknown;
|
||||||
|
sendAlert = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
UpdateServerStatus(serverStatus, availability, sendAlert);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void UpdateServerStatus(ServerStatus serverStatus, AvailabilityStatus availabilityStatus, bool sendAlert)
|
public void UpdateServerStatus(ServerStatus serverStatus, AvailabilityStatus availabilityStatus, bool sendAlert)
|
||||||
|
|
|
||||||
|
|
@ -110,8 +110,8 @@ namespace ServerManagerTool.Utils
|
||||||
|
|
||||||
TaskUtils.RunOnUIThreadAsync(() =>
|
TaskUtils.RunOnUIThreadAsync(() =>
|
||||||
{
|
{
|
||||||
var serverList = ServerManager.Instance.Servers.Where(s => string.Equals(channelId, s.Profile.DiscordChannelId, StringComparison.OrdinalIgnoreCase)
|
var serverList = ServerManager.Instance.Servers.Where(s => string.Equals(channelId, s.Profile.DiscordChannelId, StringComparison.OrdinalIgnoreCase)
|
||||||
&& (string.Equals(profileIdOrAlias, s.Profile.ProfileID, StringComparison.OrdinalIgnoreCase)
|
&& (string.Equals(profileIdOrAlias, s.Profile.ProfileID, StringComparison.OrdinalIgnoreCase)
|
||||||
|| !string.IsNullOrWhiteSpace(s.Profile.DiscordAlias) && string.Equals(profileIdOrAlias, s.Profile.DiscordAlias, StringComparison.OrdinalIgnoreCase)));
|
|| !string.IsNullOrWhiteSpace(s.Profile.DiscordAlias) && string.Equals(profileIdOrAlias, s.Profile.DiscordAlias, StringComparison.OrdinalIgnoreCase)));
|
||||||
|
|
||||||
if (serverList.IsEmpty())
|
if (serverList.IsEmpty())
|
||||||
|
|
@ -307,7 +307,7 @@ namespace ServerManagerTool.Utils
|
||||||
var server = ServerManager.Instance.Servers.First(s => string.Equals(channelId, s.Profile.DiscordChannelId, StringComparison.OrdinalIgnoreCase)
|
var server = ServerManager.Instance.Servers.First(s => string.Equals(channelId, s.Profile.DiscordChannelId, StringComparison.OrdinalIgnoreCase)
|
||||||
&& (string.Equals(profileIdOrAlias, s.Profile.ProfileID, StringComparison.OrdinalIgnoreCase)
|
&& (string.Equals(profileIdOrAlias, s.Profile.ProfileID, StringComparison.OrdinalIgnoreCase)
|
||||||
|| !string.IsNullOrWhiteSpace(s.Profile.DiscordAlias) && string.Equals(profileIdOrAlias, s.Profile.DiscordAlias, StringComparison.OrdinalIgnoreCase)));
|
|| !string.IsNullOrWhiteSpace(s.Profile.DiscordAlias) && string.Equals(profileIdOrAlias, s.Profile.DiscordAlias, StringComparison.OrdinalIgnoreCase)));
|
||||||
server.Runtime.UpdateServerStatus(serverStatus, true);
|
server.Runtime.UpdateServerStatus(serverStatus, serverStatus != ServerStatus.Unknown);
|
||||||
}).Wait();
|
}).Wait();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -408,7 +408,7 @@ namespace ServerManagerTool.Utils
|
||||||
var server = ServerManager.Instance.Servers.First(s => string.Equals(channelId, s.Profile.DiscordChannelId, StringComparison.OrdinalIgnoreCase)
|
var server = ServerManager.Instance.Servers.First(s => string.Equals(channelId, s.Profile.DiscordChannelId, StringComparison.OrdinalIgnoreCase)
|
||||||
&& (string.Equals(profileIdOrAlias, s.Profile.ProfileID, StringComparison.OrdinalIgnoreCase)
|
&& (string.Equals(profileIdOrAlias, s.Profile.ProfileID, StringComparison.OrdinalIgnoreCase)
|
||||||
|| !string.IsNullOrWhiteSpace(s.Profile.DiscordAlias) && string.Equals(profileIdOrAlias, s.Profile.DiscordAlias, StringComparison.OrdinalIgnoreCase)));
|
|| !string.IsNullOrWhiteSpace(s.Profile.DiscordAlias) && string.Equals(profileIdOrAlias, s.Profile.DiscordAlias, StringComparison.OrdinalIgnoreCase)));
|
||||||
server.Runtime.UpdateServerStatus(serverStatus, true);
|
server.Runtime.UpdateServerStatus(serverStatus, serverStatus != ServerStatus.Unknown);
|
||||||
}).Wait();
|
}).Wait();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -509,7 +509,7 @@ namespace ServerManagerTool.Utils
|
||||||
var server = ServerManager.Instance.Servers.First(s => string.Equals(channelId, s.Profile.DiscordChannelId, StringComparison.OrdinalIgnoreCase)
|
var server = ServerManager.Instance.Servers.First(s => string.Equals(channelId, s.Profile.DiscordChannelId, StringComparison.OrdinalIgnoreCase)
|
||||||
&& (string.Equals(profileIdOrAlias, s.Profile.ProfileID, StringComparison.OrdinalIgnoreCase)
|
&& (string.Equals(profileIdOrAlias, s.Profile.ProfileID, StringComparison.OrdinalIgnoreCase)
|
||||||
|| !string.IsNullOrWhiteSpace(s.Profile.DiscordAlias) && string.Equals(profileIdOrAlias, s.Profile.DiscordAlias, StringComparison.OrdinalIgnoreCase)));
|
|| !string.IsNullOrWhiteSpace(s.Profile.DiscordAlias) && string.Equals(profileIdOrAlias, s.Profile.DiscordAlias, StringComparison.OrdinalIgnoreCase)));
|
||||||
server.Runtime.UpdateServerStatus(serverStatus, true);
|
server.Runtime.UpdateServerStatus(serverStatus, serverStatus != ServerStatus.Unknown);
|
||||||
}).Wait();
|
}).Wait();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -611,7 +611,7 @@ namespace ServerManagerTool.Utils
|
||||||
var server = ServerManager.Instance.Servers.First(s => string.Equals(channelId, s.Profile.DiscordChannelId, StringComparison.OrdinalIgnoreCase)
|
var server = ServerManager.Instance.Servers.First(s => string.Equals(channelId, s.Profile.DiscordChannelId, StringComparison.OrdinalIgnoreCase)
|
||||||
&& (string.Equals(profileIdOrAlias, s.Profile.ProfileID, StringComparison.OrdinalIgnoreCase)
|
&& (string.Equals(profileIdOrAlias, s.Profile.ProfileID, StringComparison.OrdinalIgnoreCase)
|
||||||
|| !string.IsNullOrWhiteSpace(s.Profile.DiscordAlias) && string.Equals(profileIdOrAlias, s.Profile.DiscordAlias, StringComparison.OrdinalIgnoreCase)));
|
|| !string.IsNullOrWhiteSpace(s.Profile.DiscordAlias) && string.Equals(profileIdOrAlias, s.Profile.DiscordAlias, StringComparison.OrdinalIgnoreCase)));
|
||||||
server.Runtime.UpdateServerStatus(serverStatus, true);
|
server.Runtime.UpdateServerStatus(serverStatus, serverStatus != ServerStatus.Unknown);
|
||||||
}).Wait();
|
}).Wait();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -713,7 +713,7 @@ namespace ServerManagerTool.Utils
|
||||||
var server = ServerManager.Instance.Servers.First(s => string.Equals(channelId, s.Profile.DiscordChannelId, StringComparison.OrdinalIgnoreCase)
|
var server = ServerManager.Instance.Servers.First(s => string.Equals(channelId, s.Profile.DiscordChannelId, StringComparison.OrdinalIgnoreCase)
|
||||||
&& (string.Equals(profileIdOrAlias, s.Profile.ProfileID, StringComparison.OrdinalIgnoreCase)
|
&& (string.Equals(profileIdOrAlias, s.Profile.ProfileID, StringComparison.OrdinalIgnoreCase)
|
||||||
|| !string.IsNullOrWhiteSpace(s.Profile.DiscordAlias) && string.Equals(profileIdOrAlias, s.Profile.DiscordAlias, StringComparison.OrdinalIgnoreCase)));
|
|| !string.IsNullOrWhiteSpace(s.Profile.DiscordAlias) && string.Equals(profileIdOrAlias, s.Profile.DiscordAlias, StringComparison.OrdinalIgnoreCase)));
|
||||||
server.Runtime.UpdateServerStatus(serverStatus, true);
|
server.Runtime.UpdateServerStatus(serverStatus, serverStatus != ServerStatus.Unknown);
|
||||||
}).Wait();
|
}).Wait();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -810,14 +810,14 @@ namespace ServerManagerTool.Utils
|
||||||
SendAlerts = true,
|
SendAlerts = true,
|
||||||
SendEmails = false,
|
SendEmails = false,
|
||||||
ServerProcess = ServerProcessType.Update,
|
ServerProcess = ServerProcessType.Update,
|
||||||
ServerStatusChangeCallback = (ServerStatus serverStatus) =>
|
ServerStatusChangeCallback = (ServerStatus serverStatus) =>
|
||||||
{
|
{
|
||||||
TaskUtils.RunOnUIThreadAsync(() =>
|
TaskUtils.RunOnUIThreadAsync(() =>
|
||||||
{
|
{
|
||||||
var server = ServerManager.Instance.Servers.First(s => string.Equals(channelId, s.Profile.DiscordChannelId, StringComparison.OrdinalIgnoreCase)
|
var server = ServerManager.Instance.Servers.First(s => string.Equals(channelId, s.Profile.DiscordChannelId, StringComparison.OrdinalIgnoreCase)
|
||||||
&& (string.Equals(profileIdOrAlias, s.Profile.ProfileID, StringComparison.OrdinalIgnoreCase)
|
&& (string.Equals(profileIdOrAlias, s.Profile.ProfileID, StringComparison.OrdinalIgnoreCase)
|
||||||
|| !string.IsNullOrWhiteSpace(s.Profile.DiscordAlias) && string.Equals(profileIdOrAlias, s.Profile.DiscordAlias, StringComparison.OrdinalIgnoreCase)));
|
|| !string.IsNullOrWhiteSpace(s.Profile.DiscordAlias) && string.Equals(profileIdOrAlias, s.Profile.DiscordAlias, StringComparison.OrdinalIgnoreCase)));
|
||||||
server.Runtime.UpdateServerStatus(serverStatus, true);
|
server.Runtime.UpdateServerStatus(serverStatus, serverStatus != ServerStatus.Unknown);
|
||||||
}).Wait();
|
}).Wait();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,8 @@
|
||||||
|
|
||||||
<entry>
|
<entry>
|
||||||
<id>urn:uuid:3E33DCB2-ECFE-4489-B1A4-56F5D386F9DC</id>
|
<id>urn:uuid:3E33DCB2-ECFE-4489-B1A4-56F5D386F9DC</id>
|
||||||
<title>1.1.413 (1.1.413.16)</title>
|
<title>1.1.413 (1.1.413.17)</title>
|
||||||
<summary>1.1.413.16</summary>
|
<summary>1.1.413.17</summary>
|
||||||
<link href="" />
|
<link href="" />
|
||||||
<updated>2021-12-20T00:00:00Z</updated>
|
<updated>2021-12-20T00:00:00Z</updated>
|
||||||
<content type="xhtml">
|
<content type="xhtml">
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,29 @@
|
||||||
<link href="http://arkservermanager.freeforums.net/" />
|
<link href="http://arkservermanager.freeforums.net/" />
|
||||||
<updated>2021-12-20T00:00:00Z</updated>
|
<updated>2021-12-20T00:00:00Z</updated>
|
||||||
|
|
||||||
|
<entry>
|
||||||
|
<id>urn:uuid:B08AA2A8-9E9C-4CD2-8992-6848AA5F0757</id>
|
||||||
|
<title>1.1.413 (1.1.413.17)</title>
|
||||||
|
<summary>1.1.413.17</summary>
|
||||||
|
<link href="" />
|
||||||
|
<updated>2021-12-20T00:00:00Z</updated>
|
||||||
|
<content type="xhtml">
|
||||||
|
<div xmlns="http://www.w3.org/1999/xhtml" style="font-family: Arial, Verdana, Helvetica, Sans-Serif;font-size: .8em;">
|
||||||
|
<p>
|
||||||
|
<u style="font-size: .9em;">CHANGE</u>
|
||||||
|
<br/>
|
||||||
|
<ul>
|
||||||
|
<li>Added better status detection for stopping servers.</li>
|
||||||
|
</ul>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</content>
|
||||||
|
<author>
|
||||||
|
<name>bletch</name>
|
||||||
|
<email>bletch1971@hotmail.com</email>
|
||||||
|
</author>
|
||||||
|
</entry>
|
||||||
|
|
||||||
<entry>
|
<entry>
|
||||||
<id>urn:uuid:D8C3D087-64DB-4FB8-829F-7FA665F77309</id>
|
<id>urn:uuid:D8C3D087-64DB-4FB8-829F-7FA665F77309</id>
|
||||||
<title>1.1.413 (1.1.413.16)</title>
|
<title>1.1.413 (1.1.413.16)</title>
|
||||||
|
|
|
||||||
|
|
@ -435,7 +435,7 @@
|
||||||
<Setter Property="ToolTip" Value="{DynamicResource ServerSettings_RuntimeStatusRunningLabel}"/>
|
<Setter Property="ToolTip" Value="{DynamicResource ServerSettings_RuntimeStatusRunningLabel}"/>
|
||||||
</DataTrigger>
|
</DataTrigger>
|
||||||
<DataTrigger Binding="{Binding Runtime.Status}" Value="{x:Static enum:ServerStatus.Stopping}">
|
<DataTrigger Binding="{Binding Runtime.Status}" Value="{x:Static enum:ServerStatus.Stopping}">
|
||||||
<Setter Property="Source" Value="{com:Icon Path=/Ark Server Manager;component/Art/StatusOn.ico,Size=32}"/>
|
<Setter Property="Source" Value="{com:Icon Path=/Ark Server Manager;component/Art/StatusStarting.ico,Size=32}"/>
|
||||||
<Setter Property="ToolTip" Value="{DynamicResource ServerSettings_RuntimeStatusStoppingLabel}"/>
|
<Setter Property="ToolTip" Value="{DynamicResource ServerSettings_RuntimeStatusStoppingLabel}"/>
|
||||||
</DataTrigger>
|
</DataTrigger>
|
||||||
<DataTrigger Binding="{Binding Runtime.Status}" Value="{x:Static enum:ServerStatus.Stopped}">
|
<DataTrigger Binding="{Binding Runtime.Status}" Value="{x:Static enum:ServerStatus.Stopped}">
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,15 @@
|
||||||
using ServerManagerTool.Common;
|
using System;
|
||||||
using ServerManagerTool.Common.Utils;
|
|
||||||
using ServerManagerTool.Enums;
|
|
||||||
using ServerManagerTool.Lib;
|
|
||||||
using ServerManagerTool.Plugin.Common;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
|
using ServerManagerTool.Common;
|
||||||
|
using ServerManagerTool.Common.Utils;
|
||||||
|
using ServerManagerTool.Enums;
|
||||||
|
using ServerManagerTool.Lib;
|
||||||
|
using ServerManagerTool.Plugin.Common;
|
||||||
using WPFSharp.Globalizer;
|
using WPFSharp.Globalizer;
|
||||||
|
|
||||||
namespace ServerManagerTool
|
namespace ServerManagerTool
|
||||||
|
|
@ -230,6 +230,13 @@ namespace ServerManagerTool
|
||||||
SendAlerts = true,
|
SendAlerts = true,
|
||||||
ServerProcess = RestartServer ? ServerProcessType.Restart : ServerProcessType.Shutdown,
|
ServerProcess = RestartServer ? ServerProcessType.Restart : ServerProcessType.Shutdown,
|
||||||
ProgressCallback = (p, m, n) => { TaskUtils.RunOnUIThreadAsync(() => { this.AddMessage(m, n); }).DoNotWait(); },
|
ProgressCallback = (p, m, n) => { TaskUtils.RunOnUIThreadAsync(() => { this.AddMessage(m, n); }).DoNotWait(); },
|
||||||
|
ServerStatusChangeCallback = (ServerStatus serverStatus) =>
|
||||||
|
{
|
||||||
|
TaskUtils.RunOnUIThreadAsync(() =>
|
||||||
|
{
|
||||||
|
Server.Runtime.UpdateServerStatus(serverStatus, serverStatus != ServerStatus.Unknown);
|
||||||
|
}).Wait();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// if restarting the serverm, then check and update the public IP address
|
// if restarting the serverm, then check and update the public IP address
|
||||||
|
|
|
||||||
|
|
@ -257,6 +257,8 @@ namespace ServerManagerTool.Lib
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ServerStatusChangeCallback?.Invoke(ServerStatus.Stopped);
|
||||||
|
|
||||||
// make a backup of the current profile and config files.
|
// make a backup of the current profile and config files.
|
||||||
CreateProfileBackupArchiveFile(_profile);
|
CreateProfileBackupArchiveFile(_profile);
|
||||||
|
|
||||||
|
|
@ -404,6 +406,7 @@ namespace ServerManagerTool.Lib
|
||||||
}
|
}
|
||||||
|
|
||||||
_serverRunning = true;
|
_serverRunning = true;
|
||||||
|
ServerStatusChangeCallback?.Invoke(ServerStatus.Stopping);
|
||||||
LogProfileMessage($"Server process found PID {process.Id}.");
|
LogProfileMessage($"Server process found PID {process.Id}.");
|
||||||
|
|
||||||
QueryMaster.Server gameServer = null;
|
QueryMaster.Server gameServer = null;
|
||||||
|
|
@ -1165,6 +1168,8 @@ namespace ServerManagerTool.Lib
|
||||||
if (ExitCode != EXITCODE_NORMALEXIT)
|
if (ExitCode != EXITCODE_NORMALEXIT)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
ServerStatusChangeCallback?.Invoke(ServerStatus.Stopped);
|
||||||
|
|
||||||
emailMessage.AppendLine("Update Summary:");
|
emailMessage.AppendLine("Update Summary:");
|
||||||
emailMessage.AppendLine();
|
emailMessage.AppendLine();
|
||||||
emailMessage.AppendLine($"Server Manager version: {App.Instance.Version}");
|
emailMessage.AppendLine($"Server Manager version: {App.Instance.Version}");
|
||||||
|
|
@ -2435,7 +2440,7 @@ namespace ServerManagerTool.Lib
|
||||||
_loggerBranch?.Info(message);
|
_loggerBranch?.Info(message);
|
||||||
|
|
||||||
if (includeProgressCallback)
|
if (includeProgressCallback)
|
||||||
ProgressCallback?.Invoke(0, $"[INFO] {message}");
|
ProgressCallback?.Invoke(0, $"{message}");
|
||||||
|
|
||||||
Debug.WriteLine($"[INFO] (Branch {GetBranchName(branchName) ?? "unknown"}) {message}");
|
Debug.WriteLine($"[INFO] (Branch {GetBranchName(branchName) ?? "unknown"}) {message}");
|
||||||
}
|
}
|
||||||
|
|
@ -2460,7 +2465,7 @@ namespace ServerManagerTool.Lib
|
||||||
_loggerProfile?.Info(message);
|
_loggerProfile?.Info(message);
|
||||||
|
|
||||||
if (includeProgressCallback)
|
if (includeProgressCallback)
|
||||||
ProgressCallback?.Invoke(0, $"[INFO] {message}");
|
ProgressCallback?.Invoke(0, $"{message}");
|
||||||
|
|
||||||
Debug.WriteLine($"[INFO] (Profile {_profile?.ProfileName ?? "unknown"}) {message}");
|
Debug.WriteLine($"[INFO] (Profile {_profile?.ProfileName ?? "unknown"}) {message}");
|
||||||
}
|
}
|
||||||
|
|
@ -2709,6 +2714,8 @@ namespace ServerManagerTool.Lib
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ServerStatusChangeCallback?.Invoke(ServerStatus.Unknown);
|
||||||
|
|
||||||
LogProfileMessage("");
|
LogProfileMessage("");
|
||||||
LogProfileMessage($"Exitcode = {ExitCode}");
|
LogProfileMessage($"Exitcode = {ExitCode}");
|
||||||
return ExitCode;
|
return ExitCode;
|
||||||
|
|
@ -2806,6 +2813,8 @@ namespace ServerManagerTool.Lib
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ServerStatusChangeCallback?.Invoke(ServerStatus.Unknown);
|
||||||
|
|
||||||
LogProfileMessage("");
|
LogProfileMessage("");
|
||||||
LogProfileMessage($"Exitcode = {ExitCode}");
|
LogProfileMessage($"Exitcode = {ExitCode}");
|
||||||
return ExitCode;
|
return ExitCode;
|
||||||
|
|
@ -2886,6 +2895,8 @@ namespace ServerManagerTool.Lib
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ServerStatusChangeCallback?.Invoke(ServerStatus.Unknown);
|
||||||
|
|
||||||
LogProfileMessage("");
|
LogProfileMessage("");
|
||||||
LogProfileMessage($"Exitcode = {ExitCode}");
|
LogProfileMessage($"Exitcode = {ExitCode}");
|
||||||
return ExitCode;
|
return ExitCode;
|
||||||
|
|
|
||||||
|
|
@ -274,20 +274,32 @@ namespace ServerManagerTool.Lib
|
||||||
|
|
||||||
case WatcherServerStatus.RunningLocalCheck:
|
case WatcherServerStatus.RunningLocalCheck:
|
||||||
if (oldStatus != ServerStatus.Stopping)
|
if (oldStatus != ServerStatus.Stopping)
|
||||||
|
{
|
||||||
UpdateServerStatus(ServerStatus.Running, this.Availability != AvailabilityStatus.Available ? AvailabilityStatus.Waiting : this.Availability, oldStatus != ServerStatus.Running && oldStatus != ServerStatus.Unknown);
|
UpdateServerStatus(ServerStatus.Running, this.Availability != AvailabilityStatus.Available ? AvailabilityStatus.Waiting : this.Availability, oldStatus != ServerStatus.Running && oldStatus != ServerStatus.Unknown);
|
||||||
if (this.ProfileSnapshot.MOTDIntervalEnabled && this.motdIntervalTimer != null && !this.motdIntervalTimer.Enabled) this.motdIntervalTimer.Start();
|
if (this.ProfileSnapshot.MOTDIntervalEnabled && this.motdIntervalTimer != null && !this.motdIntervalTimer.Enabled) this.motdIntervalTimer.Start();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if (this.motdIntervalTimer != null && this.motdIntervalTimer.Enabled) this.motdIntervalTimer.Stop();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WatcherServerStatus.RunningExternalCheck:
|
case WatcherServerStatus.RunningExternalCheck:
|
||||||
if (oldStatus != ServerStatus.Stopping)
|
if (oldStatus != ServerStatus.Stopping)
|
||||||
|
{
|
||||||
UpdateServerStatus(ServerStatus.Running, AvailabilityStatus.Waiting, oldStatus != ServerStatus.Running && oldStatus != ServerStatus.Unknown);
|
UpdateServerStatus(ServerStatus.Running, AvailabilityStatus.Waiting, oldStatus != ServerStatus.Running && oldStatus != ServerStatus.Unknown);
|
||||||
if (this.ProfileSnapshot.MOTDIntervalEnabled && this.motdIntervalTimer != null && !this.motdIntervalTimer.Enabled) this.motdIntervalTimer.Start();
|
if (this.ProfileSnapshot.MOTDIntervalEnabled && this.motdIntervalTimer != null && !this.motdIntervalTimer.Enabled) this.motdIntervalTimer.Start();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if (this.motdIntervalTimer != null && this.motdIntervalTimer.Enabled) this.motdIntervalTimer.Stop();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WatcherServerStatus.Published:
|
case WatcherServerStatus.Published:
|
||||||
if (oldStatus != ServerStatus.Stopping)
|
if (oldStatus != ServerStatus.Stopping)
|
||||||
|
{
|
||||||
UpdateServerStatus(ServerStatus.Running, AvailabilityStatus.Available, oldStatus != ServerStatus.Running && oldStatus != ServerStatus.Unknown);
|
UpdateServerStatus(ServerStatus.Running, AvailabilityStatus.Available, oldStatus != ServerStatus.Running && oldStatus != ServerStatus.Unknown);
|
||||||
if (this.ProfileSnapshot.MOTDIntervalEnabled && this.motdIntervalTimer != null && !this.motdIntervalTimer.Enabled) this.motdIntervalTimer.Start();
|
if (this.ProfileSnapshot.MOTDIntervalEnabled && this.motdIntervalTimer != null && !this.motdIntervalTimer.Enabled) this.motdIntervalTimer.Start();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if (this.motdIntervalTimer != null && this.motdIntervalTimer.Enabled) this.motdIntervalTimer.Stop();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
@ -965,7 +977,23 @@ namespace ServerManagerTool.Lib
|
||||||
|
|
||||||
public void UpdateServerStatus(ServerStatus serverStatus, bool sendAlert)
|
public void UpdateServerStatus(ServerStatus serverStatus, bool sendAlert)
|
||||||
{
|
{
|
||||||
UpdateServerStatus(serverStatus, Availability, sendAlert);
|
var availability = Availability;
|
||||||
|
|
||||||
|
switch (serverStatus)
|
||||||
|
{
|
||||||
|
case ServerStatus.Stopped:
|
||||||
|
case ServerStatus.Stopping:
|
||||||
|
case ServerStatus.Uninstalled:
|
||||||
|
case ServerStatus.Updating:
|
||||||
|
availability = AvailabilityStatus.Unavailable;
|
||||||
|
break;
|
||||||
|
case ServerStatus.Unknown:
|
||||||
|
availability = AvailabilityStatus.Unknown;
|
||||||
|
sendAlert = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
UpdateServerStatus(serverStatus, availability, sendAlert);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void UpdateServerStatus(ServerStatus serverStatus, AvailabilityStatus availabilityStatus, bool sendAlert)
|
public void UpdateServerStatus(ServerStatus serverStatus, AvailabilityStatus availabilityStatus, bool sendAlert)
|
||||||
|
|
|
||||||
|
|
@ -307,7 +307,7 @@ namespace ServerManagerTool.Utils
|
||||||
var server = ServerManager.Instance.Servers.First(s => string.Equals(channelId, s.Profile.DiscordChannelId, StringComparison.OrdinalIgnoreCase)
|
var server = ServerManager.Instance.Servers.First(s => string.Equals(channelId, s.Profile.DiscordChannelId, StringComparison.OrdinalIgnoreCase)
|
||||||
&& (string.Equals(profileIdOrAlias, s.Profile.ProfileID, StringComparison.OrdinalIgnoreCase)
|
&& (string.Equals(profileIdOrAlias, s.Profile.ProfileID, StringComparison.OrdinalIgnoreCase)
|
||||||
|| !string.IsNullOrWhiteSpace(s.Profile.DiscordAlias) && string.Equals(profileIdOrAlias, s.Profile.DiscordAlias, StringComparison.OrdinalIgnoreCase)));
|
|| !string.IsNullOrWhiteSpace(s.Profile.DiscordAlias) && string.Equals(profileIdOrAlias, s.Profile.DiscordAlias, StringComparison.OrdinalIgnoreCase)));
|
||||||
server.Runtime.UpdateServerStatus(serverStatus, true);
|
server.Runtime.UpdateServerStatus(serverStatus, serverStatus != ServerStatus.Unknown);
|
||||||
}).Wait();
|
}).Wait();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -408,7 +408,7 @@ namespace ServerManagerTool.Utils
|
||||||
var server = ServerManager.Instance.Servers.First(s => string.Equals(channelId, s.Profile.DiscordChannelId, StringComparison.OrdinalIgnoreCase)
|
var server = ServerManager.Instance.Servers.First(s => string.Equals(channelId, s.Profile.DiscordChannelId, StringComparison.OrdinalIgnoreCase)
|
||||||
&& (string.Equals(profileIdOrAlias, s.Profile.ProfileID, StringComparison.OrdinalIgnoreCase)
|
&& (string.Equals(profileIdOrAlias, s.Profile.ProfileID, StringComparison.OrdinalIgnoreCase)
|
||||||
|| !string.IsNullOrWhiteSpace(s.Profile.DiscordAlias) && string.Equals(profileIdOrAlias, s.Profile.DiscordAlias, StringComparison.OrdinalIgnoreCase)));
|
|| !string.IsNullOrWhiteSpace(s.Profile.DiscordAlias) && string.Equals(profileIdOrAlias, s.Profile.DiscordAlias, StringComparison.OrdinalIgnoreCase)));
|
||||||
server.Runtime.UpdateServerStatus(serverStatus, true);
|
server.Runtime.UpdateServerStatus(serverStatus, serverStatus != ServerStatus.Unknown);
|
||||||
}).Wait();
|
}).Wait();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -509,7 +509,7 @@ namespace ServerManagerTool.Utils
|
||||||
var server = ServerManager.Instance.Servers.First(s => string.Equals(channelId, s.Profile.DiscordChannelId, StringComparison.OrdinalIgnoreCase)
|
var server = ServerManager.Instance.Servers.First(s => string.Equals(channelId, s.Profile.DiscordChannelId, StringComparison.OrdinalIgnoreCase)
|
||||||
&& (string.Equals(profileIdOrAlias, s.Profile.ProfileID, StringComparison.OrdinalIgnoreCase)
|
&& (string.Equals(profileIdOrAlias, s.Profile.ProfileID, StringComparison.OrdinalIgnoreCase)
|
||||||
|| !string.IsNullOrWhiteSpace(s.Profile.DiscordAlias) && string.Equals(profileIdOrAlias, s.Profile.DiscordAlias, StringComparison.OrdinalIgnoreCase)));
|
|| !string.IsNullOrWhiteSpace(s.Profile.DiscordAlias) && string.Equals(profileIdOrAlias, s.Profile.DiscordAlias, StringComparison.OrdinalIgnoreCase)));
|
||||||
server.Runtime.UpdateServerStatus(serverStatus, true);
|
server.Runtime.UpdateServerStatus(serverStatus, serverStatus != ServerStatus.Unknown);
|
||||||
}).Wait();
|
}).Wait();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -611,7 +611,7 @@ namespace ServerManagerTool.Utils
|
||||||
var server = ServerManager.Instance.Servers.First(s => string.Equals(channelId, s.Profile.DiscordChannelId, StringComparison.OrdinalIgnoreCase)
|
var server = ServerManager.Instance.Servers.First(s => string.Equals(channelId, s.Profile.DiscordChannelId, StringComparison.OrdinalIgnoreCase)
|
||||||
&& (string.Equals(profileIdOrAlias, s.Profile.ProfileID, StringComparison.OrdinalIgnoreCase)
|
&& (string.Equals(profileIdOrAlias, s.Profile.ProfileID, StringComparison.OrdinalIgnoreCase)
|
||||||
|| !string.IsNullOrWhiteSpace(s.Profile.DiscordAlias) && string.Equals(profileIdOrAlias, s.Profile.DiscordAlias, StringComparison.OrdinalIgnoreCase)));
|
|| !string.IsNullOrWhiteSpace(s.Profile.DiscordAlias) && string.Equals(profileIdOrAlias, s.Profile.DiscordAlias, StringComparison.OrdinalIgnoreCase)));
|
||||||
server.Runtime.UpdateServerStatus(serverStatus, true);
|
server.Runtime.UpdateServerStatus(serverStatus, serverStatus != ServerStatus.Unknown);
|
||||||
}).Wait();
|
}).Wait();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -713,7 +713,7 @@ namespace ServerManagerTool.Utils
|
||||||
var server = ServerManager.Instance.Servers.First(s => string.Equals(channelId, s.Profile.DiscordChannelId, StringComparison.OrdinalIgnoreCase)
|
var server = ServerManager.Instance.Servers.First(s => string.Equals(channelId, s.Profile.DiscordChannelId, StringComparison.OrdinalIgnoreCase)
|
||||||
&& (string.Equals(profileIdOrAlias, s.Profile.ProfileID, StringComparison.OrdinalIgnoreCase)
|
&& (string.Equals(profileIdOrAlias, s.Profile.ProfileID, StringComparison.OrdinalIgnoreCase)
|
||||||
|| !string.IsNullOrWhiteSpace(s.Profile.DiscordAlias) && string.Equals(profileIdOrAlias, s.Profile.DiscordAlias, StringComparison.OrdinalIgnoreCase)));
|
|| !string.IsNullOrWhiteSpace(s.Profile.DiscordAlias) && string.Equals(profileIdOrAlias, s.Profile.DiscordAlias, StringComparison.OrdinalIgnoreCase)));
|
||||||
server.Runtime.UpdateServerStatus(serverStatus, true);
|
server.Runtime.UpdateServerStatus(serverStatus, serverStatus != ServerStatus.Unknown);
|
||||||
}).Wait();
|
}).Wait();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -817,7 +817,7 @@ namespace ServerManagerTool.Utils
|
||||||
var server = ServerManager.Instance.Servers.First(s => string.Equals(channelId, s.Profile.DiscordChannelId, StringComparison.OrdinalIgnoreCase)
|
var server = ServerManager.Instance.Servers.First(s => string.Equals(channelId, s.Profile.DiscordChannelId, StringComparison.OrdinalIgnoreCase)
|
||||||
&& (string.Equals(profileIdOrAlias, s.Profile.ProfileID, StringComparison.OrdinalIgnoreCase)
|
&& (string.Equals(profileIdOrAlias, s.Profile.ProfileID, StringComparison.OrdinalIgnoreCase)
|
||||||
|| !string.IsNullOrWhiteSpace(s.Profile.DiscordAlias) && string.Equals(profileIdOrAlias, s.Profile.DiscordAlias, StringComparison.OrdinalIgnoreCase)));
|
|| !string.IsNullOrWhiteSpace(s.Profile.DiscordAlias) && string.Equals(profileIdOrAlias, s.Profile.DiscordAlias, StringComparison.OrdinalIgnoreCase)));
|
||||||
server.Runtime.UpdateServerStatus(serverStatus, true);
|
server.Runtime.UpdateServerStatus(serverStatus, serverStatus != ServerStatus.Unknown);
|
||||||
}).Wait();
|
}).Wait();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,8 @@
|
||||||
|
|
||||||
<entry>
|
<entry>
|
||||||
<id>urn:uuid:19B09A66-43F2-4D5F-AF33-5C77D7EA9A6B</id>
|
<id>urn:uuid:19B09A66-43F2-4D5F-AF33-5C77D7EA9A6B</id>
|
||||||
<title>1.1.58 (1.1.58.16)</title>
|
<title>1.1.58 (1.1.58.17)</title>
|
||||||
<summary>1.1.58.16</summary>
|
<summary>1.1.58.17</summary>
|
||||||
<link href="" />
|
<link href="" />
|
||||||
<updated>2021-12-20T00:00:00Z</updated>
|
<updated>2021-12-20T00:00:00Z</updated>
|
||||||
<content type="xhtml">
|
<content type="xhtml">
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,29 @@
|
||||||
<link href="http://servermanagers.freeforums.net/" />
|
<link href="http://servermanagers.freeforums.net/" />
|
||||||
<updated>2021-12-20T00:00:00Z</updated>
|
<updated>2021-12-20T00:00:00Z</updated>
|
||||||
|
|
||||||
|
<entry>
|
||||||
|
<id>urn:uuid:25F39F6F-E7FE-417D-9BC9-EC6EF7DEC1BC</id>
|
||||||
|
<title>1.1.58 (1.1.58.17)</title>
|
||||||
|
<summary>1.1.58.17</summary>
|
||||||
|
<link href="" />
|
||||||
|
<updated>2021-12-20T00:00:00Z</updated>
|
||||||
|
<content type="xhtml">
|
||||||
|
<div xmlns="http://www.w3.org/1999/xhtml" style="font-family: Arial, Verdana, Helvetica, Sans-Serif;font-size: .8em;">
|
||||||
|
<p>
|
||||||
|
<u style="font-size: .9em;">CHANGE</u>
|
||||||
|
<br/>
|
||||||
|
<ul>
|
||||||
|
<li>Added better status detection for stopping servers.</li>
|
||||||
|
</ul>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</content>
|
||||||
|
<author>
|
||||||
|
<name>bletch</name>
|
||||||
|
<email>bletch1971@hotmail.com</email>
|
||||||
|
</author>
|
||||||
|
</entry>
|
||||||
|
|
||||||
<entry>
|
<entry>
|
||||||
<id>urn:uuid:0C184A8F-803D-4AC6-B9CB-599810F9AD29</id>
|
<id>urn:uuid:0C184A8F-803D-4AC6-B9CB-599810F9AD29</id>
|
||||||
<title>1.1.58 (1.1.58.16)</title>
|
<title>1.1.58 (1.1.58.16)</title>
|
||||||
|
|
|
||||||
|
|
@ -433,7 +433,7 @@
|
||||||
<Setter Property="ToolTip" Value="{DynamicResource ServerSettings_RuntimeStatusRunningLabel}"/>
|
<Setter Property="ToolTip" Value="{DynamicResource ServerSettings_RuntimeStatusRunningLabel}"/>
|
||||||
</DataTrigger>
|
</DataTrigger>
|
||||||
<DataTrigger Binding="{Binding Runtime.Status}" Value="{x:Static enum:ServerStatus.Stopping}">
|
<DataTrigger Binding="{Binding Runtime.Status}" Value="{x:Static enum:ServerStatus.Stopping}">
|
||||||
<Setter Property="Source" Value="{com:Icon Path=/ConanServerManager;component/Art/StatusOn.ico,Size=32}"/>
|
<Setter Property="Source" Value="{com:Icon Path=/ConanServerManager;component/Art/StatusStarting.ico,Size=32}"/>
|
||||||
<Setter Property="ToolTip" Value="{DynamicResource ServerSettings_RuntimeStatusStoppingLabel}"/>
|
<Setter Property="ToolTip" Value="{DynamicResource ServerSettings_RuntimeStatusStoppingLabel}"/>
|
||||||
</DataTrigger>
|
</DataTrigger>
|
||||||
<DataTrigger Binding="{Binding Runtime.Status}" Value="{x:Static enum:ServerStatus.Stopped}">
|
<DataTrigger Binding="{Binding Runtime.Status}" Value="{x:Static enum:ServerStatus.Stopped}">
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,16 @@
|
||||||
using ServerManagerTool.Common;
|
using System;
|
||||||
using ServerManagerTool.Common.Utils;
|
|
||||||
using ServerManagerTool.Enums;
|
|
||||||
using ServerManagerTool.Lib;
|
|
||||||
using ServerManagerTool.Plugin.Common;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
|
using ServerManagerTool.Common;
|
||||||
|
using ServerManagerTool.Common.Utils;
|
||||||
|
using ServerManagerTool.Enums;
|
||||||
|
using ServerManagerTool.Lib;
|
||||||
|
using ServerManagerTool.Plugin.Common;
|
||||||
using WPFSharp.Globalizer;
|
using WPFSharp.Globalizer;
|
||||||
using static ServerManagerTool.Lib.ServerApp;
|
|
||||||
|
|
||||||
namespace ServerManagerTool
|
namespace ServerManagerTool
|
||||||
{
|
{
|
||||||
|
|
@ -228,6 +227,13 @@ namespace ServerManagerTool
|
||||||
SendAlerts = true,
|
SendAlerts = true,
|
||||||
ServerProcess = RestartServer ? ServerProcessType.Restart : ServerProcessType.Shutdown,
|
ServerProcess = RestartServer ? ServerProcessType.Restart : ServerProcessType.Shutdown,
|
||||||
ProgressCallback = (p, m, n) => { TaskUtils.RunOnUIThreadAsync(() => { this.AddMessage(m, n); }).DoNotWait(); },
|
ProgressCallback = (p, m, n) => { TaskUtils.RunOnUIThreadAsync(() => { this.AddMessage(m, n); }).DoNotWait(); },
|
||||||
|
ServerStatusChangeCallback = (ServerStatus serverStatus) =>
|
||||||
|
{
|
||||||
|
TaskUtils.RunOnUIThreadAsync(() =>
|
||||||
|
{
|
||||||
|
Server.Runtime.UpdateServerStatus(serverStatus, serverStatus != ServerStatus.Unknown);
|
||||||
|
}).Wait();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// if restarting the serverm, then check and update the public IP address
|
// if restarting the serverm, then check and update the public IP address
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue