Start DHCP on launch if it's enabled in config.

This commit is contained in:
Eugene Bujak
2018-12-28 21:01:16 +03:00
parent f868fdbf7a
commit 03effab345
2 changed files with 14 additions and 1 deletions

5
app.go
View File

@@ -192,6 +192,11 @@ func main() {
log.Fatal(err)
}
err = startDHCPServer()
if err != nil {
log.Fatal(err)
}
URL := fmt.Sprintf("http://%s", address)
log.Println("Go to " + URL)
log.Fatal(http.ListenAndServe(address, nil))