The Free Software Media System - Server Backend & API
Check service running before checking self restart
hatharry71386f0ceb15
diff --git a/MediaBrowser.ServerApplication/MainStartup.cs b/MediaBrowser.ServerApplication/MainStartup.csindex d56558c72c..e4f5f3a694 100644--- a/MediaBrowser.ServerApplication/MainStartup.cs+++ b/MediaBrowser.ServerApplication/MainStartup.cs@@ -45,7 +45,11 @@ namespace MediaBrowser.ServerApplication{var options = new StartupOptions();_isRunningAsService = options.ContainsOption("-service");- _canRestartService = CanRestartWindowsService();++ if (_isRunningAsService)+ {+ _canRestartService = CanRestartWindowsService();+ }var currentProcess = Process.GetCurrentProcess();