Skip to content

Commit

Permalink
Add systemd support
Browse files Browse the repository at this point in the history
  • Loading branch information
hez2010 committed May 29, 2021
1 parent 831e471 commit 0a7a381
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ static async ValueTask<SurfOptions> LoadOptions(string fileName)
static IHostBuilder CreateHostBuilder(string[] args, SurfOptions options) =>
Host.CreateDefaultBuilder(args)
.UseWindowsService()
.UseSystemd()
.ConfigureServices(services =>
{
services.AddSingleton(options);
Expand Down
1 change: 1 addition & 0 deletions SysuSurf.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting.Systemd" Version="6.0.0-preview.4.21253.7" />
<PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="6.0.0-preview.4.21253.7" />
<PackageReference Include="SharpPcap" Version="6.0.0" />
</ItemGroup>
Expand Down

0 comments on commit 0a7a381

Please sign in to comment.