mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
update mono restart
This commit is contained in:
parent
d9c4775015
commit
609d1f19cc
@ -81,7 +81,8 @@ namespace MediaBrowser.Server.Mono
|
||||
|
||||
_appHost = new ApplicationHost(appPaths, logManager, options, fileSystem, "MBServer.Mono", nativeApp);
|
||||
|
||||
if (options.ContainsOption("-v")) {
|
||||
if (options.ContainsOption("-v"))
|
||||
{
|
||||
Console.WriteLine(_appHost.ApplicationVersion.ToString());
|
||||
return;
|
||||
}
|
||||
@ -145,14 +146,17 @@ namespace MediaBrowser.Server.Mono
|
||||
|
||||
_logger.Info("Starting new instance");
|
||||
|
||||
var currentProcess = Process.GetCurrentProcess();
|
||||
|
||||
var args = Environment.GetCommandLineArgs()
|
||||
.Skip(1)
|
||||
.Select(NormalizeCommandLineArgument);
|
||||
|
||||
var commandLineArgsString = string.Join(" ", args.ToArray());
|
||||
var module = Environment.GetCommandLineArgs().First();
|
||||
|
||||
Process.Start(currentProcess.MainModule.FileName, commandLineArgsString);
|
||||
_logger.Info("Executable: {0}", module);
|
||||
_logger.Info("Arguments: {0}", commandLineArgsString);
|
||||
|
||||
Process.Start(module, commandLineArgsString);
|
||||
|
||||
_logger.Info("Calling Environment.Exit");
|
||||
Environment.Exit(0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user