add systemd

This commit is contained in:
陈国伟 2021-11-12 12:02:25 +08:00
parent 004b55c728
commit 4dc0350e59
2 changed files with 2 additions and 0 deletions

View File

@ -9,6 +9,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting.Systemd" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="6.0.0" />
<PackageReference Include="Serilog.Sinks.Network" Version="2.0.2.68" />
<ProjectReference Include="..\FastGithub.DomainResolve\FastGithub.DomainResolve.csproj" />

View File

@ -29,6 +29,7 @@ namespace FastGithub
{
return Host
.CreateDefaultBuilder(args)
.UseSystemd()
.UseWindowsService()
.UseDefaultServiceProvider(c =>
{