Remove Jackett.Service.Windows

No longer needed now that Jackett.Service covers both scenarios
This commit is contained in:
flightlevel 2018-06-24 12:04:27 +10:00
parent 4970219ea7
commit ca1af97e42
3 changed files with 0 additions and 59 deletions

View File

@ -1,13 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
<PropertyGroup>
<OutputType>Exe</OutputType>
<AssemblyName>JackettService</AssemblyName>
<TargetFramework>net461</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Windows.Compatibility" Version="2.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Jackett.Server\Jackett.Server.csproj" />
</ItemGroup>
</Project>

View File

@ -1,17 +0,0 @@
using System.ServiceProcess;
namespace Jackett.Service.Windows
{
internal static class Program
{
private static void Main()
{
ServiceBase[] ServicesToRun;
ServicesToRun = new ServiceBase[]
{
new Service()
};
ServiceBase.Run(ServicesToRun);
}
}
}

View File

@ -1,29 +0,0 @@
using Jackett.Server;
using System.ServiceProcess;
using System.Threading;
using System.Threading.Tasks;
namespace Jackett.Service.Windows
{
public class Service : ServiceBase
{
private CancellationTokenSource tokenSource = new CancellationTokenSource();
protected override void OnStart(string[] args)
{
CancellationToken token = tokenSource.Token;
Task.Run(async () =>
{
//Registering callback that would cancel downloading
token.Register(() => Helper.StopWebHost());
Jackett.Server.Program.Main(new string[0]);
}, token);
}
protected override void OnStop()
{
tokenSource.Cancel(true);
}
}
}