2
0
mirror of https://github.com/namecoin/ncdns synced 2024-10-31 09:20:31 +00:00
ncdns/main.go
Hugo Landau 4959056021 Fix imports due to repository move
©! I, Hugo Landau <hlandau@devever.net>, hereby licence these changes under the
©! licence with SHA256 hash
©! fd80a26fbb3f644af1fa994134446702932968519797227e07a1368dea80f0bc.
2017-06-07 05:14:50 +01:00

33 lines
718 B
Go

package main
import (
"github.com/hlandau/dexlogconfig"
"github.com/namecoin/ncdns/server"
"gopkg.in/hlandau/easyconfig.v1"
"gopkg.in/hlandau/service.v2"
"path/filepath"
)
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 <hlandau@devever.net> GPLv3 or later