Skip to content

Commit

Permalink
Override the default content root path/current directory to use AppCo…
Browse files Browse the repository at this point in the history
…ntext.BaseDirectory
  • Loading branch information
kevinchalet committed Dec 29, 2024
1 parent fa511c5 commit c2aba82
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@ The following Legrand and BTicino products are partially or fully supported by O
| In One by Legrand | | 88205 | | |
| In One by Legrand | | 88213 | | |
| | | | | |
| MyHome Up | | 03535 | MH202 | |
| MyHome Up | | 03598 | F454 | |
| MyHome Up | | 03651 | F418U2 | |
| MyHome Up | | 03847 | F411U1 | |
| MyHome Up | | 03848 | F411U2 | Shutter mode is not yet supported |
| MyHome Up | | 03651 | F418U2 | |
| MyHome Up | | 03598 | F454 | |
| MyHome Up | | 03535 | MH202 | |
| | | | | |
| MyHome Play | Céliane | 67223 | | |
| MyHome Play | | 88328 | 3578 | |
Expand Down
8 changes: 7 additions & 1 deletion src/OpenNetty.Daemon/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;

var builder = Host.CreateApplicationBuilder();
Directory.SetCurrentDirectory(AppContext.BaseDirectory);

var builder = Host.CreateApplicationBuilder(new HostApplicationBuilderSettings
{
Args = args,
ContentRootPath = AppContext.BaseDirectory
});

builder.Services.AddSystemd()
.AddWindowsService();
Expand Down

0 comments on commit c2aba82

Please sign in to comment.