mirror of
https://github.com/Jackett/Jackett.git
synced 2025-12-25 23:24:52 +01:00
Really hope I don't break anything with this Went to have a go at .NET core and it just became too confusing for me with 'Jackett' namespace referring to both Jackett.Common and Jackett
30 lines
740 B
C#
30 lines
740 B
C#
using Jackett.Common.Models.Config;
|
|
using System.ServiceProcess;
|
|
using Jackett.Common;
|
|
|
|
namespace Jackett.Service
|
|
{
|
|
public partial class Service : ServiceBase
|
|
{
|
|
public Service()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
protected override void OnStart(string[] args)
|
|
{
|
|
Engine.BuildContainer(new RuntimeSettings(), new WebApi2Module());
|
|
Engine.Logger.Info("Service starting");
|
|
Engine.Server.Initalize();
|
|
Engine.Server.Start();
|
|
Engine.Logger.Info("Service started");
|
|
}
|
|
|
|
protected override void OnStop()
|
|
{
|
|
Engine.Logger.Info("Service stopping");
|
|
Engine.Server.Stop();
|
|
}
|
|
}
|
|
}
|