diff --git a/src/NzbDrone.Host/Startup.cs b/src/NzbDrone.Host/Startup.cs index 6377d8dae..4121329a6 100644 --- a/src/NzbDrone.Host/Startup.cs +++ b/src/NzbDrone.Host/Startup.cs @@ -18,6 +18,8 @@ using NzbDrone.Common.Serializer; using NzbDrone.Core.Configuration; using NzbDrone.Core.Datastore; using NzbDrone.Core.Instrumentation; +using NzbDrone.Core.Lifecycle; +using NzbDrone.Core.Messaging.Events; using NzbDrone.Host; using NzbDrone.Host.AccessControl; using NzbDrone.Http.Authentication; @@ -202,6 +204,7 @@ namespace NzbDrone.Host IConfigFileProvider configFileProvider, IRuntimeInfo runtimeInfo, IFirewallAdapter firewallAdapter, + IEventAggregator eventAggregator, SonarrErrorPipeline errorHandler) { initializeLogger.Initialize(); @@ -223,6 +226,8 @@ namespace NzbDrone.Host Console.CancelKeyPress += (sender, eventArgs) => NLog.LogManager.Configuration = null; } + eventAggregator.PublishEvent(new ApplicationStartingEvent()); + if (OsInfo.IsWindows && runtimeInfo.IsAdmin) { firewallAdapter.MakeAccessible();