diff --git a/hkexshd/hkexshd.go b/hkexshd/hkexshd.go index 0c2aae0..5d28f75 100644 --- a/hkexshd/hkexshd.go +++ b/hkexshd/hkexshd.go @@ -213,12 +213,6 @@ func main() { os.Exit(0) } - if dbg { - log.SetOutput(os.Stdout) - } else { - log.SetOutput(ioutil.Discard) - } - { me, e := user.Current() if e != nil || me.Uid != "0" { @@ -226,6 +220,12 @@ func main() { } } + if dbg { + log.SetOutput(os.Stdout) + } else { + log.SetOutput(ioutil.Discard) + } + // Listen on TCP port 2000 on all available unicast and // anycast IP addresses of the local system. l, err := hkexnet.Listen("tcp", laddr)