From 58a78c3d2375e650d7a68a82ae5c1bdf57c11bb4 Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Sat, 9 May 2020 13:42:45 -0400 Subject: [PATCH] Fix the service not installing when double clicked --- src/Tgstation.Server.Host.Service/Program.cs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/Tgstation.Server.Host.Service/Program.cs b/src/Tgstation.Server.Host.Service/Program.cs index 1ec0f9eae2..3c20b6c98e 100644 --- a/src/Tgstation.Server.Host.Service/Program.cs +++ b/src/Tgstation.Server.Host.Service/Program.cs @@ -110,9 +110,6 @@ namespace Tgstation.Server.Host.Service using (var loggerFactory = new LoggerFactory()) { - if (Configure) - await WatchdogFactory.CreateWatchdog(loggerFactory).RunAsync(true, Array.Empty(), default).ConfigureAwait(false); - if (Install) { if (Uninstall) @@ -134,6 +131,12 @@ namespace Tgstation.Server.Host.Service var state = new ListDictionary(); installer.Install(state); } + + if (Configure) + { + Console.WriteLine("For this first run we'll launch the console runner so you may use the setup wizard."); + Console.WriteLine("If it starts successfully, feel free to close it and then start the service from the Windows control panel."); + } } else if (Uninstall) using (var installer = new ServiceInstaller()) @@ -145,6 +148,9 @@ namespace Tgstation.Server.Host.Service else if (!Configure) using (var service = new ServerService(WatchdogFactory, loggerFactory, Trace ? LogLevel.Trace : Debug ? LogLevel.Debug : LogLevel.Information)) ServiceBase.Run(service); + + if (Configure) + await WatchdogFactory.CreateWatchdog(loggerFactory).RunAsync(true, Array.Empty(), default).ConfigureAwait(false); } } }