cmd/ctrld: fix missing unmarshalling config without --cd

Otherwise, DNS won't be set in non-Linux systems.

Updates #54
This commit is contained in:
Cuong Manh Le
2023-02-10 22:36:44 +07:00
committed by Cuong Manh Le
parent 997ec342e0
commit bac6810956

View File

@@ -203,6 +203,10 @@ func initCLI() {
sc.Arguments = append(sc.Arguments, "--homedir="+dir)
}
if err := v.Unmarshal(&cfg); err != nil {
log.Fatalf("failed to unmarshal config: %v", err)
}
initLogging()
processCDFlags()
// On Windows, the service will be run as SYSTEM, so if ctrld start as Admin,