You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ncdns/main.go

34 lines
719 B
Go

10 years ago
package main
10 years ago
import (
"path/filepath"
"github.com/hlandau/dexlogconfig"
"github.com/namecoin/ncdns/server"
"gopkg.in/hlandau/easyconfig.v1"
"gopkg.in/hlandau/service.v2"
)
10 years ago
func main() {
9 years ago
cfg := server.Config{}
9 years ago
9 years ago
config := easyconfig.Configurator{
9 years ago
ProgramName: "ncdns",
10 years ago
}
config.ParseFatal(&cfg)
dexlogconfig.Init()
10 years ago
10 years ago
// We use the configPath to resolve paths relative to the config file.
cfg.ConfigDir = filepath.Dir(config.ConfigFilePath())
service.Main(&service.Info{
10 years ago
Description: "Namecoin to DNS Daemon",
10 years ago
DefaultChroot: service.EmptyChrootPath,
9 years ago
NewFunc: func() (service.Runnable, error) {
return server.New(&cfg)
},
})
10 years ago
}
10 years ago
// © 2014 Hugo Landau <hlandau@devever.net> GPLv3 or later