-
Notifications
You must be signed in to change notification settings - Fork 41
/
main.go
33 lines (26 loc) · 719 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package main
import (
"path/filepath"
"github.com/hlandau/dexlogconfig"
"github.com/namecoin/ncdns/server"
"gopkg.in/hlandau/easyconfig.v1"
"gopkg.in/hlandau/service.v2"
)
func main() {
cfg := server.Config{}
config := easyconfig.Configurator{
ProgramName: "ncdns",
}
config.ParseFatal(&cfg)
dexlogconfig.Init()
// We use the configPath to resolve paths relative to the config file.
cfg.ConfigDir = filepath.Dir(config.ConfigFilePath())
service.Main(&service.Info{
Description: "Namecoin to DNS Daemon",
DefaultChroot: service.EmptyChrootPath,
NewFunc: func() (service.Runnable, error) {
return server.New(&cfg)
},
})
}
// © 2014 Hugo Landau <[email protected]> GPLv3 or later