Skip to content

Commit

Permalink
Merge 46c3b81 into 8fee408
Browse files Browse the repository at this point in the history
  • Loading branch information
helto4real committed Apr 11, 2020
2 parents 8fee408 + 46c3b81 commit b2ac6ec
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ The following environment variables are available to identify your Home Assistan

Example giving:
```
docker run -d \
docker run -dt \
--name netdaemon \
--restart=always \
-e HASS_HOST=192.168.1.1 \
Expand Down
9 changes: 6 additions & 3 deletions src/Service/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,17 @@ public static async Task Main(string[] args)
.MinimumLevel.Is(Program.LogLevel)
.WriteTo.Console(theme: AnsiConsoleTheme.Code)
.CreateLogger();

CreateHostBuilder(args).Build().Run();
}
catch (Exception e)
{
Log.Fatal(e, "Home assistant add-on config not valid json, ending add-on...");
return;
}

CreateHostBuilder(args).Build().Run();
finally
{
Log.CloseAndFlush();
}
}

public static IHostBuilder CreateHostBuilder(string[] args) =>
Expand Down

0 comments on commit b2ac6ec

Please sign in to comment.