Files
Jackett-Jackett/src/Jackett.Service/Service.cs
flightlevel 3e5e48c3a0 Change namespace to Jackett.Common (#2691)
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
2018-03-10 19:05:56 +11:00

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();
}
}
}