|
|
@ -214,7 +214,7 @@ namespace MediaBrowser.ServerApplication
|
|
|
|
fileSystem,
|
|
|
|
fileSystem,
|
|
|
|
"MBServer",
|
|
|
|
"MBServer",
|
|
|
|
nativeApp);
|
|
|
|
nativeApp);
|
|
|
|
|
|
|
|
|
|
|
|
var initProgress = new Progress<double>();
|
|
|
|
var initProgress = new Progress<double>();
|
|
|
|
|
|
|
|
|
|
|
|
if (!runService)
|
|
|
|
if (!runService)
|
|
|
@ -513,23 +513,19 @@ namespace MediaBrowser.ServerApplication
|
|
|
|
|
|
|
|
|
|
|
|
if (!_isRunningAsService)
|
|
|
|
if (!_isRunningAsService)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_logger.Info("Hiding server notify icon");
|
|
|
|
//_logger.Info("Hiding server notify icon");
|
|
|
|
_serverNotifyIcon.Visible = false;
|
|
|
|
//_serverNotifyIcon.Visible = false;
|
|
|
|
|
|
|
|
|
|
|
|
_logger.Info("Starting new instance");
|
|
|
|
_logger.Info("Starting new instance");
|
|
|
|
//Application.Restart();
|
|
|
|
//Application.Restart();
|
|
|
|
Process.Start(_appHost.ServerConfigurationManager.ApplicationPaths.ApplicationPath);
|
|
|
|
Process.Start(_appHost.ServerConfigurationManager.ApplicationPaths.ApplicationPath);
|
|
|
|
|
|
|
|
|
|
|
|
_logger.Info("Calling Environment.Exit");
|
|
|
|
ShutdownWindowsApplication();
|
|
|
|
Environment.Exit(0);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private static void ShutdownWindowsApplication()
|
|
|
|
private static void ShutdownWindowsApplication()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_logger.Info("Hiding server notify icon");
|
|
|
|
|
|
|
|
_serverNotifyIcon.Visible = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_logger.Info("Calling Application.Exit");
|
|
|
|
_logger.Info("Calling Application.Exit");
|
|
|
|
Application.Exit();
|
|
|
|
Application.Exit();
|
|
|
|
|
|
|
|
|
|
|
|