From 5532050c04c428414ab669625750361a22d44fea Mon Sep 17 00:00:00 2001 From: Brett Hewitson Date: Mon, 8 Aug 2022 20:01:42 +1000 Subject: [PATCH] Automatic Management Changes - rearranged the options so they are grouped correctly. - added RestartIfShutdown property to ServerApp and changed to use when checking to restart server. --- .../Globalization/de-DE/de-DE.xaml | 2 +- .../Globalization/en-US/en-US.xaml | 2 +- .../Globalization/fr-FR/fr-FR.xaml | 2 +- src/ARKServerManager/Lib/ServerApp.cs | 12 +++-- .../UserControls/ServerSettingsControl.xaml | 48 ++++++++++------- .../Utils/DiscordBotHelper.cs | 10 ++-- src/ARKServerManager/VersionFeed.xml | 9 ++-- src/ARKServerManager/VersionFeedBeta.xml | 25 ++++++++- .../Windows/ServerMonitorWindow.xaml.cs | 10 ++-- .../Globalization/de-DE/de-DE.xaml | 2 +- .../Globalization/en-US/en-US.xaml | 2 +- .../Globalization/fr-FR/fr-FR.xaml | 2 +- .../Globalization/pt-BR/pt-BR.xaml | 2 +- .../Globalization/ru-RU/ru-RU.xaml | 2 +- src/ConanServerManager/Lib/ServerApp.cs | 12 +++-- .../UserControls/ServerSettingsControl.xaml | 53 +++++++++++-------- .../Utils/DiscordBotHelper.cs | 10 ++-- src/ConanServerManager/VersionFeed.xml | 9 ++-- src/ConanServerManager/VersionFeedBeta.xml | 25 ++++++++- .../Windows/ServerMonitorWindow.xaml.cs | 10 ++-- 20 files changed, 157 insertions(+), 92 deletions(-) diff --git a/src/ARKServerManager/Globalization/de-DE/de-DE.xaml b/src/ARKServerManager/Globalization/de-DE/de-DE.xaml index 9669dca7..909df50a 100644 --- a/src/ARKServerManager/Globalization/de-DE/de-DE.xaml +++ b/src/ARKServerManager/Globalization/de-DE/de-DE.xaml @@ -1221,7 +1221,7 @@ Schließt den Server in den Auto Aktualisierungszyklus ein Wenn aktiviert, wird der Server während des automatischen Aktualisierungszyklus regelmäßig aktualisiert. Siehe die Einstellungen für die Optionen für die automatische Aktualisierung. Startet den Server neu, wenn er heruntergefahren ist - Wenn aktiviert, wird der Server neu gestartet, auch wenn er für automatische Neustarts und automatische Updates heruntergefahren wird. + Wenn aktiviert, wird der Server neu gestartet, auch wenn er für automatische Updates heruntergefahren wird. diff --git a/src/ARKServerManager/Globalization/en-US/en-US.xaml b/src/ARKServerManager/Globalization/en-US/en-US.xaml index 1d8aa9f5..d3e53e66 100644 --- a/src/ARKServerManager/Globalization/en-US/en-US.xaml +++ b/src/ARKServerManager/Globalization/en-US/en-US.xaml @@ -1318,7 +1318,7 @@ Include server in the Auto-Update cycle If enabled, the server will be periodically updated during the Auto-Update cycle. See the settings for Auto-Update options. Restart server if shutdown - If enabled, the server will be restarted even if shutdown for Auto-Restarts and Auto-Updates. + If enabled, the server will be restarted even if shutdown for Auto-Updates. diff --git a/src/ARKServerManager/Globalization/fr-FR/fr-FR.xaml b/src/ARKServerManager/Globalization/fr-FR/fr-FR.xaml index 3e2e7ae9..a7a60306 100644 --- a/src/ARKServerManager/Globalization/fr-FR/fr-FR.xaml +++ b/src/ARKServerManager/Globalization/fr-FR/fr-FR.xaml @@ -1316,7 +1316,7 @@ Inclure cycle de mise à jour automatique du serveur Si cette option est activée, le serveur sera périodiquement mis à jour pendant le cycle de mise à jour automatique. Voir les paramètres pour les options de mise à jour automatique. Redémarrer le serveur en cas d'arrêt - Si cette option est activée, le serveur sera redémarré même s'il est arrêté pour les redémarrages automatiques et les mises à jour automatiques. + Si cette option est activée, le serveur sera redémarré même s'il est arrêté pour les mises à jour automatiques. diff --git a/src/ARKServerManager/Lib/ServerApp.cs b/src/ARKServerManager/Lib/ServerApp.cs index 6949fded..b169fe9e 100644 --- a/src/ARKServerManager/Lib/ServerApp.cs +++ b/src/ARKServerManager/Lib/ServerApp.cs @@ -107,6 +107,7 @@ namespace ServerManagerTool.Lib public bool OutputLogs { get; set; } = false; public bool PerformWorldSave { get; set; } = Config.Default.ServerShutdown_EnableWorldSave; public ProgressDelegate ProgressCallback { get; set; } = null; + public bool RestartIfShutdown { get; set; } = false; public bool SendAlerts { get; set; } = false; public bool SendEmails { get; set; } = false; public bool SendShutdownMessages { get; set; } = Config.Default.ServerShutdown_SendShutdownMessages; @@ -332,7 +333,7 @@ namespace ServerManagerTool.Lib // check if the server was previously running. if (!_serverRunning) { - if (_profile.AutoRestartIfShutdown) + if (RestartIfShutdown) { LogProfileMessage("Server was not running, server will be started as the setting to restart if shutdown is TRUE."); } @@ -3295,7 +3296,8 @@ namespace ServerManagerTool.Lib SendAlerts = SendAlerts, SendEmails = SendEmails, ServerProcess = ServerProcess, - SteamCMDProcessWindowStyle = ProcessWindowStyle.Hidden + SteamCMDProcessWindowStyle = ProcessWindowStyle.Hidden, + RestartIfShutdown = profile.AutoRestartIfShutdown, }; app.PerformProfileUpdate(branch, profile); profileExitCodes.TryAdd(profile, app.ExitCode); @@ -3316,7 +3318,8 @@ namespace ServerManagerTool.Lib SendAlerts = SendAlerts, SendEmails = SendEmails, ServerProcess = ServerProcess, - SteamCMDProcessWindowStyle = ProcessWindowStyle.Hidden + SteamCMDProcessWindowStyle = ProcessWindowStyle.Hidden, + RestartIfShutdown = profile.AutoRestartIfShutdown, }; app.PerformProfileUpdate(branch, profile); profileExitCodes.TryAdd(profile, app.ExitCode); @@ -3483,7 +3486,8 @@ namespace ServerManagerTool.Lib SendAlerts = true, SendEmails = true, ServerProcess = type, - SteamCMDProcessWindowStyle = ProcessWindowStyle.Hidden + SteamCMDProcessWindowStyle = ProcessWindowStyle.Hidden, + RestartIfShutdown = performRestart, }; exitCode = app.PerformProfileShutdown(profile, performRestart, performUpdate ? ServerUpdateType.ServerAndMods : ServerUpdateType.None, true, false, CancellationToken.None); diff --git a/src/ARKServerManager/UserControls/ServerSettingsControl.xaml b/src/ARKServerManager/UserControls/ServerSettingsControl.xaml index 223d36c4..2bb0f988 100644 --- a/src/ARKServerManager/UserControls/ServerSettingsControl.xaml +++ b/src/ARKServerManager/UserControls/ServerSettingsControl.xaml @@ -1372,20 +1372,17 @@ - - - - - - - - - + + + + + + - - + + - - - + + @@ -1461,8 +1457,8 @@ - - + + @@ -1516,10 +1512,22 @@ - - - - + + + + + + + + + + + + + + + + diff --git a/src/ARKServerManager/Utils/DiscordBotHelper.cs b/src/ARKServerManager/Utils/DiscordBotHelper.cs index b384197e..9026a0da 100644 --- a/src/ARKServerManager/Utils/DiscordBotHelper.cs +++ b/src/ARKServerManager/Utils/DiscordBotHelper.cs @@ -448,7 +448,6 @@ namespace ServerManagerTool.Utils _currentProfileCommands.Add(server.Profile.ProfileID, restart ? CommandType.Restart : CommandType.Start); var profile = ServerProfileSnapshot.Create(server.Profile); - profile.AutoRestartIfShutdown = true; profileList.Add(profile); } } @@ -462,6 +461,7 @@ namespace ServerManagerTool.Utils SendAlerts = true, SendEmails = false, ServerProcess = ServerProcessType.Restart, + RestartIfShutdown = true, ServerStatusChangeCallback = (ServerStatus serverStatus) => { TaskUtils.RunOnUIThreadAsync(() => @@ -576,6 +576,7 @@ namespace ServerManagerTool.Utils SendAlerts = true, SendEmails = false, ServerProcess = shutdown ? ServerProcessType.Shutdown : ServerProcessType.Stop, + RestartIfShutdown = false, ServerStatusChangeCallback = (ServerStatus serverStatus) => { TaskUtils.RunOnUIThreadAsync(() => @@ -644,8 +645,6 @@ namespace ServerManagerTool.Utils { foreach (var server in serverList) { - var performRestart = false; - if (!server.Profile.AllowDiscordUpdate) { responseList.Add(string.Format(_globalizer.GetResourceString("DiscordBot_CommandDisabledProfile"), CommandType.Update, server.Profile.ProfileName)); @@ -662,7 +661,6 @@ namespace ServerManagerTool.Utils switch (server.Runtime.Status) { case ServerStatus.Running: - performRestart = true; break; case ServerStatus.Initializing: @@ -678,7 +676,6 @@ namespace ServerManagerTool.Utils _currentProfileCommands.Add(server.Profile.ProfileID, CommandType.Update); var profile = ServerProfileSnapshot.Create(server.Profile); - profile.RestartAfterShutdown1 = performRestart; // use this property to trigger a restart profileList.Add(profile); } } @@ -692,6 +689,7 @@ namespace ServerManagerTool.Utils SendAlerts = true, SendEmails = false, ServerProcess = ServerProcessType.Update, + RestartIfShutdown = false, ServerStatusChangeCallback = (ServerStatus serverStatus) => { TaskUtils.RunOnUIThreadAsync(() => @@ -707,7 +705,7 @@ namespace ServerManagerTool.Utils Task.Run(() => { - app.PerformProfileShutdown(profile, profile.RestartAfterShutdown1, ServerUpdateType.ServerAndMods, false, false, token); + app.PerformProfileShutdown(profile, true, ServerUpdateType.ServerAndMods, false, false, token); _currentProfileCommands.Remove(profile.ProfileId); }, token); diff --git a/src/ARKServerManager/VersionFeed.xml b/src/ARKServerManager/VersionFeed.xml index 748c3101..7ffdfebe 100644 --- a/src/ARKServerManager/VersionFeed.xml +++ b/src/ARKServerManager/VersionFeed.xml @@ -5,14 +5,14 @@ Ark Server Manager Version Feed This is the Ark Server Manager release version feed. - 2022-08-07T00:00:00Z + 2022-08-08T00:00:00Z urn:uuid:84E1DDF9-EFA4-4A8B-90DE-564AE3B3B633 - 1.1.437 (1.1.437.2) - 1.1.437.2 + 1.1.437 (1.1.437.3) + 1.1.437.3 - 2022-08-07T00:00:00Z + 2022-08-08T00:00:00Z

@@ -20,6 +20,7 @@

  • Server Update - updated the code to simplify which set of dedicated server files (Ark Survival Evolved or Ark: SotF) is required when performing server and mod file updates. Separate Cache folders will be maintained for each.
  • +
  • Automatic Management - rearranged the options so they are grouped correctly.
  • Auto-Start Server Option - added a new option selection for on Boot and on Login.

diff --git a/src/ARKServerManager/VersionFeedBeta.xml b/src/ARKServerManager/VersionFeedBeta.xml index 2f350b9c..a4e29aeb 100644 --- a/src/ARKServerManager/VersionFeedBeta.xml +++ b/src/ARKServerManager/VersionFeedBeta.xml @@ -5,7 +5,30 @@ Ark Server Manager Version Feed This is the Ark Server Manager beta version feed. - 2022-08-07T00:00:00Z + 2022-08-08T00:00:00Z + + + urn:uuid:84E1DDF9-EFA4-4A8B-90DE-564AE3B3B633 + 1.1.437 (1.1.437.3) + 1.1.437.3 + + 2022-08-08T00:00:00Z + +
+

+ CHANGE +
+

    +
  • Automatic Management - rearranged the options so they are grouped correctly.
  • +
+

+
+
+ + bletch + bletch1971@hotmail.com + +
urn:uuid:84E1DDF9-EFA4-4A8B-90DE-564AE3B3B633 diff --git a/src/ARKServerManager/Windows/ServerMonitorWindow.xaml.cs b/src/ARKServerManager/Windows/ServerMonitorWindow.xaml.cs index 0170c804..d27875c2 100644 --- a/src/ARKServerManager/Windows/ServerMonitorWindow.xaml.cs +++ b/src/ARKServerManager/Windows/ServerMonitorWindow.xaml.cs @@ -1332,7 +1332,6 @@ namespace ServerManagerTool.Windows _currentProfileCommands.Add(server.Profile.ProfileID, restart ? CommandType.Restart : CommandType.Start); var profile = ServerProfileSnapshot.Create(server.Profile); - profile.AutoRestartIfShutdown = true; profileList.Add(profile); } @@ -1349,6 +1348,7 @@ namespace ServerManagerTool.Windows SendEmails = false, ShutdownReason = shutdownReason, ServerProcess = ServerProcessType.Restart, + RestartIfShutdown = true, ServerStatusChangeCallback = (ServerStatus serverStatus) => { TaskUtils.RunOnUIThreadAsync(() => @@ -1492,6 +1492,7 @@ namespace ServerManagerTool.Windows SendEmails = false, ShutdownReason = shutdownReason, ServerProcess = shutdown ? ServerProcessType.Shutdown : ServerProcessType.Stop, + RestartIfShutdown = false, ServerStatusChangeCallback = (ServerStatus serverStatus) => { TaskUtils.RunOnUIThreadAsync(() => @@ -1588,8 +1589,6 @@ namespace ServerManagerTool.Windows foreach (var server in serverList) { - var performRestart = false; - // check if another command is being run against the profile if (_currentProfileCommands.ContainsKey(server.Profile.ProfileID)) { @@ -1600,7 +1599,6 @@ namespace ServerManagerTool.Windows switch (server.Runtime.Status) { case ServerStatus.Running: - performRestart = true; break; case ServerStatus.Initializing: @@ -1616,7 +1614,6 @@ namespace ServerManagerTool.Windows _currentProfileCommands.Add(server.Profile.ProfileID, CommandType.Update); var profile = ServerProfileSnapshot.Create(server.Profile); - profile.RestartAfterShutdown1 = performRestart; // use this property to trigger a restart profileList.Add(profile); } @@ -1633,6 +1630,7 @@ namespace ServerManagerTool.Windows SendEmails = false, ShutdownReason = shutdownReason, ServerProcess = ServerProcessType.Update, + RestartIfShutdown = false, ServerStatusChangeCallback = (ServerStatus serverStatus) => { TaskUtils.RunOnUIThreadAsync(() => @@ -1650,7 +1648,7 @@ namespace ServerManagerTool.Windows { AddMessageBlockContent(string.Format(_globalizer.GetResourceString("DiscordBot_UpdateRequested"), profile.ServerName)); - app.PerformProfileShutdown(profile, profile.RestartAfterShutdown1, updateModsOnly ? ServerUpdateType.Mods : ServerUpdateType.ServerAndMods, false, false, token); + app.PerformProfileShutdown(profile, true, updateModsOnly ? ServerUpdateType.Mods : ServerUpdateType.ServerAndMods, false, false, token); Task.Delay(DELAY_PROCESSCOMPLETE).Wait(); diff --git a/src/ConanServerManager/Globalization/de-DE/de-DE.xaml b/src/ConanServerManager/Globalization/de-DE/de-DE.xaml index cd2340af..d969e371 100644 --- a/src/ConanServerManager/Globalization/de-DE/de-DE.xaml +++ b/src/ConanServerManager/Globalization/de-DE/de-DE.xaml @@ -1184,7 +1184,7 @@ Schließt den Server in den Auto Aktualisierungszyklus ein Wenn aktiviert, wird der Server während des automatischen Aktualisierungszyklus regelmäßig aktualisiert. Siehe die Einstellungen für die Optionen für die automatische Aktualisierung. Startet den Server neu, wenn er heruntergefahren ist - Wenn aktiviert, wird der Server neu gestartet, auch wenn er für automatische Neustarts und automatische Updates heruntergefahren wird. + Wenn aktiviert, wird der Server neu gestartet, auch wenn er für automatische Updates heruntergefahren wird. diff --git a/src/ConanServerManager/Globalization/en-US/en-US.xaml b/src/ConanServerManager/Globalization/en-US/en-US.xaml index 1575ba00..27499ef0 100644 --- a/src/ConanServerManager/Globalization/en-US/en-US.xaml +++ b/src/ConanServerManager/Globalization/en-US/en-US.xaml @@ -1254,7 +1254,7 @@ Include server in the Auto-Update cycle If enabled, the server will be periodically updated during the Auto-Update cycle. See the settings for Auto-Update options. Restart server if shutdown - If enabled, the server will be restarted even if shutdown for Auto-Restarts and Auto-Updates. + If enabled, the server will be restarted even if shutdown for Auto-Updates. diff --git a/src/ConanServerManager/Globalization/fr-FR/fr-FR.xaml b/src/ConanServerManager/Globalization/fr-FR/fr-FR.xaml index 1a2f9bd8..96a8cb0f 100644 --- a/src/ConanServerManager/Globalization/fr-FR/fr-FR.xaml +++ b/src/ConanServerManager/Globalization/fr-FR/fr-FR.xaml @@ -963,7 +963,7 @@ Inclure cycle de mise à jour automatique du serveur Si cette option est activée, le serveur sera périodiquement mis à jour pendant le cycle de mise à jour automatique. Voir les paramètres pour les options de mise à jour automatique. Redémarrer le serveur en cas d'arrêt - Si cette option est activée, le serveur sera redémarré même s'il est arrêté pour les redémarrages automatiques et les mises à jour automatiques. + Si cette option est activée, le serveur sera redémarré même s'il est arrêté pour les mises à jour automatiques. diff --git a/src/ConanServerManager/Globalization/pt-BR/pt-BR.xaml b/src/ConanServerManager/Globalization/pt-BR/pt-BR.xaml index 67b4894e..c3fd33ca 100644 --- a/src/ConanServerManager/Globalization/pt-BR/pt-BR.xaml +++ b/src/ConanServerManager/Globalization/pt-BR/pt-BR.xaml @@ -1016,7 +1016,7 @@ Incluir servidor no ciclo de atualização automática Se ativado, o servidor será atualizado periodicamente durante o ciclo de atualização automática. Veja as configurações para as opções de atualização automática. Reinicie o servidor se desligado - Se ativado, o servidor será reiniciado mesmo se for encerrado para reinicializações automáticas e atualizações automáticas. + Se ativado, o servidor será reiniciado mesmo se for encerrado para atualizações automáticas. diff --git a/src/ConanServerManager/Globalization/ru-RU/ru-RU.xaml b/src/ConanServerManager/Globalization/ru-RU/ru-RU.xaml index d6055047..97b93ae4 100644 --- a/src/ConanServerManager/Globalization/ru-RU/ru-RU.xaml +++ b/src/ConanServerManager/Globalization/ru-RU/ru-RU.xaml @@ -1193,7 +1193,7 @@ Вкл. периодические Авто-Обновления If enabled, the server will be periodically updated during the Auto-Update cycle. See the settings for Auto-Update options. Перезагрузить сервер после выключения - If enabled, the server will be restarted even if shutdown for Auto-Restarts and Auto-Updates. + If enabled, the server will be restarted even if shutdown for Auto-Updates. diff --git a/src/ConanServerManager/Lib/ServerApp.cs b/src/ConanServerManager/Lib/ServerApp.cs index 4e05fb91..aad777b2 100644 --- a/src/ConanServerManager/Lib/ServerApp.cs +++ b/src/ConanServerManager/Lib/ServerApp.cs @@ -107,6 +107,7 @@ namespace ServerManagerTool.Lib public int ExitCode { get; set; } = EXITCODE_NORMALEXIT; public bool OutputLogs { get; set; } = false; public bool PerformWorldSave { get; set; } = Config.Default.ServerShutdown_EnableWorldSave; + public bool RestartIfShutdown { get; set; } = false; public bool SendAlerts { get; set; } = false; public bool SendEmails { get; set; } = false; public ProgressDelegate ProgressCallback { get; set; } = null; @@ -333,7 +334,7 @@ namespace ServerManagerTool.Lib // check if the server was previously running. if (!_serverRunning) { - if (_profile.AutoRestartIfShutdown) + if (RestartIfShutdown) { LogProfileMessage("Server was not running, server will be started as the setting to restart if shutdown is TRUE."); } @@ -3170,7 +3171,8 @@ namespace ServerManagerTool.Lib SendAlerts = SendAlerts, SendEmails = SendEmails, ServerProcess = ServerProcess, - SteamCMDProcessWindowStyle = ProcessWindowStyle.Hidden + SteamCMDProcessWindowStyle = ProcessWindowStyle.Hidden, + RestartIfShutdown = profile.AutoRestartIfShutdown, }; app.PerformProfileUpdate(branch, profile); profileExitCodes.TryAdd(profile, app.ExitCode); @@ -3191,7 +3193,8 @@ namespace ServerManagerTool.Lib SendAlerts = SendAlerts, SendEmails = SendEmails, ServerProcess = ServerProcess, - SteamCMDProcessWindowStyle = ProcessWindowStyle.Hidden + SteamCMDProcessWindowStyle = ProcessWindowStyle.Hidden, + RestartIfShutdown = profile.AutoRestartIfShutdown, }; app.PerformProfileUpdate(branch, profile); profileExitCodes.TryAdd(profile, app.ExitCode); @@ -3358,7 +3361,8 @@ namespace ServerManagerTool.Lib SendAlerts = true, SendEmails = true, ServerProcess = type, - SteamCMDProcessWindowStyle = ProcessWindowStyle.Hidden + SteamCMDProcessWindowStyle = ProcessWindowStyle.Hidden, + RestartIfShutdown = performRestart, }; exitCode = app.PerformProfileShutdown(profile, performRestart, performUpdate ? ServerUpdateType.ServerAndMods : ServerUpdateType.None, true, false, CancellationToken.None); diff --git a/src/ConanServerManager/UserControls/ServerSettingsControl.xaml b/src/ConanServerManager/UserControls/ServerSettingsControl.xaml index 82ca957e..014a2d48 100644 --- a/src/ConanServerManager/UserControls/ServerSettingsControl.xaml +++ b/src/ConanServerManager/UserControls/ServerSettingsControl.xaml @@ -953,20 +953,17 @@ - - - - - - - - - + + + + + + - - - + + + - - - + + + @@ -1041,9 +1038,9 @@ - - - + + + @@ -1095,11 +1092,23 @@ + + + + + + + + + + - - - - + + + + + + diff --git a/src/ConanServerManager/Utils/DiscordBotHelper.cs b/src/ConanServerManager/Utils/DiscordBotHelper.cs index 25945b88..4314b043 100644 --- a/src/ConanServerManager/Utils/DiscordBotHelper.cs +++ b/src/ConanServerManager/Utils/DiscordBotHelper.cs @@ -444,7 +444,6 @@ namespace ServerManagerTool.Utils _currentProfileCommands.Add(server.Profile.ProfileID, restart ? CommandType.Restart : CommandType.Start); var profile = ServerProfileSnapshot.Create(server.Profile); - profile.AutoRestartIfShutdown = true; profileList.Add(profile); } } @@ -458,6 +457,7 @@ namespace ServerManagerTool.Utils SendAlerts = true, SendEmails = false, ServerProcess = ServerProcessType.Restart, + RestartIfShutdown = true, ServerStatusChangeCallback = (ServerStatus serverStatus) => { TaskUtils.RunOnUIThreadAsync(() => @@ -571,6 +571,7 @@ namespace ServerManagerTool.Utils SendAlerts = true, SendEmails = false, ServerProcess = shutdown ? ServerProcessType.Shutdown : ServerProcessType.Stop, + RestartIfShutdown = false, ServerStatusChangeCallback = (ServerStatus serverStatus) => { TaskUtils.RunOnUIThreadAsync(() => @@ -638,8 +639,6 @@ namespace ServerManagerTool.Utils { foreach (var server in serverList) { - var performRestart = false; - if (!server.Profile.AllowDiscordUpdate) { responseList.Add(string.Format(_globalizer.GetResourceString("DiscordBot_CommandDisabledProfile"), CommandType.Update, server.Profile.ProfileName)); @@ -656,7 +655,6 @@ namespace ServerManagerTool.Utils switch (server.Runtime.Status) { case ServerStatus.Running: - performRestart = true; break; case ServerStatus.Initializing: @@ -672,7 +670,6 @@ namespace ServerManagerTool.Utils _currentProfileCommands.Add(server.Profile.ProfileID, CommandType.Update); var profile = ServerProfileSnapshot.Create(server.Profile); - profile.RestartAfterShutdown1 = performRestart; // use this property to trigger a restart profileList.Add(profile); } } @@ -686,6 +683,7 @@ namespace ServerManagerTool.Utils SendAlerts = true, SendEmails = false, ServerProcess = ServerProcessType.Update, + RestartIfShutdown = false, ServerStatusChangeCallback = (ServerStatus serverStatus) => { TaskUtils.RunOnUIThreadAsync(() => @@ -701,7 +699,7 @@ namespace ServerManagerTool.Utils Task.Run(() => { - app.PerformProfileShutdown(profile, profile.RestartAfterShutdown1, ServerUpdateType.ServerAndMods, false, false, token); + app.PerformProfileShutdown(profile, true, ServerUpdateType.ServerAndMods, false, false, token); _currentProfileCommands.Remove(profile.ProfileId); }, token); diff --git a/src/ConanServerManager/VersionFeed.xml b/src/ConanServerManager/VersionFeed.xml index ffaf73d5..dabf255a 100644 --- a/src/ConanServerManager/VersionFeed.xml +++ b/src/ConanServerManager/VersionFeed.xml @@ -5,14 +5,14 @@ Conan Server Manager Version Feed This is the Conan Server Manager release version feed. - 2022-08-07T00:00:00Z + 2022-08-08T00:00:00Z urn:uuid:6D1F49A0-06E6-415F-AA92-AACD598BC50C - 1.1.80 (1.1.80.3) - 1.1.80.3 + 1.1.80 (1.1.80.4) + 1.1.80.4 - 2022-08-07T00:00:00Z + 2022-08-08T00:00:00Z

@@ -21,6 +21,7 @@

  • Server Details Section - added new option to use the Conan Testlive Dedicated Server files. This new option will switch the steam application id of the server files to use the Conan Testlive Dedicated Server files, instead of the Conan Dedicated Server files.
  • Server Update - updated the code to determine which set of dedicated server files (Conan or Conan Testlive) is required when performing server and mod file updates. Separate Cache folders will be maintained for each.
  • +
  • Automatic Management - rearranged the options so they are grouped correctly.
  • Auto-Start Server Option - added a new option selection for on Boot and on Login.

diff --git a/src/ConanServerManager/VersionFeedBeta.xml b/src/ConanServerManager/VersionFeedBeta.xml index eac85387..0f83d2d6 100644 --- a/src/ConanServerManager/VersionFeedBeta.xml +++ b/src/ConanServerManager/VersionFeedBeta.xml @@ -5,7 +5,30 @@ Conan Server Manager Version Feed This is the Conan Server Manager beta version feed. - 2022-08-07T00:00:00Z + 2022-08-08T00:00:00Z + + + urn:uuid:6D1F49A0-06E6-415F-AA92-AACD598BC50C + 1.1.80 (1.1.80.4) + 1.1.80.4 + + 2022-08-08T00:00:00Z + +
+

+ CHANGE +
+

    +
  • Automatic Management - rearranged the options so they are grouped correctly.
  • +
+

+
+
+ + bletch + bletch1971@hotmail.com + +
urn:uuid:6D1F49A0-06E6-415F-AA92-AACD598BC50C diff --git a/src/ConanServerManager/Windows/ServerMonitorWindow.xaml.cs b/src/ConanServerManager/Windows/ServerMonitorWindow.xaml.cs index 92b68041..f0f6da95 100644 --- a/src/ConanServerManager/Windows/ServerMonitorWindow.xaml.cs +++ b/src/ConanServerManager/Windows/ServerMonitorWindow.xaml.cs @@ -1329,7 +1329,6 @@ namespace ServerManagerTool.Windows _currentProfileCommands.Add(server.Profile.ProfileID, restart ? CommandType.Restart : CommandType.Start); var profile = ServerProfileSnapshot.Create(server.Profile); - profile.AutoRestartIfShutdown = true; profileList.Add(profile); } @@ -1346,6 +1345,7 @@ namespace ServerManagerTool.Windows SendEmails = false, ShutdownReason = shutdownReason, ServerProcess = ServerProcessType.Restart, + RestartIfShutdown = true, ServerStatusChangeCallback = (ServerStatus serverStatus) => { TaskUtils.RunOnUIThreadAsync(() => @@ -1489,6 +1489,7 @@ namespace ServerManagerTool.Windows SendEmails = false, ShutdownReason = shutdownReason, ServerProcess = shutdown ? ServerProcessType.Shutdown : ServerProcessType.Stop, + RestartIfShutdown = false, ServerStatusChangeCallback = (ServerStatus serverStatus) => { TaskUtils.RunOnUIThreadAsync(() => @@ -1585,8 +1586,6 @@ namespace ServerManagerTool.Windows foreach (var server in serverList) { - var performRestart = false; - // check if another command is being run against the profile if (_currentProfileCommands.ContainsKey(server.Profile.ProfileID)) { @@ -1597,7 +1596,6 @@ namespace ServerManagerTool.Windows switch (server.Runtime.Status) { case ServerStatus.Running: - performRestart = true; break; case ServerStatus.Initializing: @@ -1613,7 +1611,6 @@ namespace ServerManagerTool.Windows _currentProfileCommands.Add(server.Profile.ProfileID, CommandType.Update); var profile = ServerProfileSnapshot.Create(server.Profile); - profile.RestartAfterShutdown1 = performRestart; // use this property to trigger a restart profileList.Add(profile); } @@ -1630,6 +1627,7 @@ namespace ServerManagerTool.Windows SendEmails = false, ShutdownReason = shutdownReason, ServerProcess = ServerProcessType.Update, + RestartIfShutdown = false, ServerStatusChangeCallback = (ServerStatus serverStatus) => { TaskUtils.RunOnUIThreadAsync(() => @@ -1647,7 +1645,7 @@ namespace ServerManagerTool.Windows { AddMessageBlockContent(string.Format(_globalizer.GetResourceString("DiscordBot_UpdateRequested"), profile.ServerName)); - app.PerformProfileShutdown(profile, profile.RestartAfterShutdown1, updateModsOnly ? ServerUpdateType.Mods : ServerUpdateType.ServerAndMods, false, false, token); + app.PerformProfileShutdown(profile, true, updateModsOnly ? ServerUpdateType.Mods : ServerUpdateType.ServerAndMods, false, false, token); Task.Delay(DELAY_PROCESSCOMPLETE).Wait();