2015-06-05 14:27:01 +00:00
|
|
|
|
using MediaBrowser.Server.Startup.Common;
|
|
|
|
|
|
2014-11-09 18:24:57 +00:00
|
|
|
|
namespace MediaBrowser.Server.Mono.Native
|
2013-09-25 00:54:51 +00:00
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Class NativeApp
|
|
|
|
|
/// </summary>
|
2014-11-26 04:27:55 +00:00
|
|
|
|
internal class NativeApp : BaseMonoApp
|
2013-09-25 00:54:51 +00:00
|
|
|
|
{
|
2015-10-05 16:05:08 +00:00
|
|
|
|
public NativeApp(StartupOptions startupOptions)
|
|
|
|
|
: base(startupOptions)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2013-09-25 00:54:51 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Shutdowns this instance.
|
|
|
|
|
/// </summary>
|
2014-11-23 23:10:41 +00:00
|
|
|
|
public override void Shutdown()
|
2013-09-25 00:54:51 +00:00
|
|
|
|
{
|
2014-11-09 18:24:57 +00:00
|
|
|
|
MainClass.Shutdown();
|
2013-09-25 00:54:51 +00:00
|
|
|
|
}
|
2015-05-23 22:01:13 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Determines whether this instance [can self restart].
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <value><c>true</c> if this instance can self restart; otherwise, <c>false</c>.</value>
|
|
|
|
|
public override bool CanSelfRestart
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
2016-01-10 17:36:38 +00:00
|
|
|
|
// A restart script must be provided
|
|
|
|
|
return StartupOptions.ContainsOption("-restartpath");
|
2015-05-23 22:01:13 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Restarts this instance.
|
|
|
|
|
/// </summary>
|
2015-06-05 14:27:01 +00:00
|
|
|
|
public override void Restart(StartupOptions startupOptions)
|
2015-05-23 22:01:13 +00:00
|
|
|
|
{
|
2015-06-05 14:27:01 +00:00
|
|
|
|
MainClass.Restart(startupOptions);
|
2015-05-23 22:01:13 +00:00
|
|
|
|
}
|
2013-09-25 00:54:51 +00:00
|
|
|
|
}
|
|
|
|
|
}
|