|
|
@ -81,7 +81,8 @@ namespace MediaBrowser.Server.Mono
|
|
|
|
|
|
|
|
|
|
|
|
_appHost = new ApplicationHost(appPaths, logManager, options, fileSystem, "MBServer.Mono", nativeApp);
|
|
|
|
_appHost = new ApplicationHost(appPaths, logManager, options, fileSystem, "MBServer.Mono", nativeApp);
|
|
|
|
|
|
|
|
|
|
|
|
if (options.ContainsOption("-v")) {
|
|
|
|
if (options.ContainsOption("-v"))
|
|
|
|
|
|
|
|
{
|
|
|
|
Console.WriteLine(_appHost.ApplicationVersion.ToString());
|
|
|
|
Console.WriteLine(_appHost.ApplicationVersion.ToString());
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -145,14 +146,17 @@ namespace MediaBrowser.Server.Mono
|
|
|
|
|
|
|
|
|
|
|
|
_logger.Info("Starting new instance");
|
|
|
|
_logger.Info("Starting new instance");
|
|
|
|
|
|
|
|
|
|
|
|
var currentProcess = Process.GetCurrentProcess();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var args = Environment.GetCommandLineArgs()
|
|
|
|
var args = Environment.GetCommandLineArgs()
|
|
|
|
|
|
|
|
.Skip(1)
|
|
|
|
.Select(NormalizeCommandLineArgument);
|
|
|
|
.Select(NormalizeCommandLineArgument);
|
|
|
|
|
|
|
|
|
|
|
|
var commandLineArgsString = string.Join(" ", args.ToArray());
|
|
|
|
var commandLineArgsString = string.Join(" ", args.ToArray());
|
|
|
|
|
|
|
|
var module = Environment.GetCommandLineArgs().First();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_logger.Info("Executable: {0}", module);
|
|
|
|
|
|
|
|
_logger.Info("Arguments: {0}", commandLineArgsString);
|
|
|
|
|
|
|
|
|
|
|
|
Process.Start(currentProcess.MainModule.FileName, commandLineArgsString);
|
|
|
|
Process.Start(module, commandLineArgsString);
|
|
|
|
|
|
|
|
|
|
|
|
_logger.Info("Calling Environment.Exit");
|
|
|
|
_logger.Info("Calling Environment.Exit");
|
|
|
|
Environment.Exit(0);
|
|
|
|
Environment.Exit(0);
|
|
|
|