diff options
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 21 |
1 files changed, 9 insertions, 12 deletions
@@ -53,24 +53,24 @@ func main() { if argv.Daemon { // turn off timestamps for STDOUT (systemd adds them) log.DaemonMode(true) + startGus() startHTTP() os.Exit(0) } if gui.NoGui() { - all := me.portmaps.All() - for all.Scan() { - pm := all.Next() - if !pm.Enabled { - continue - } - log.Info("portmap enabled for port", pm.Localport, "to", pm.Dest) - go gus3000(pm) - } + startGus() startHTTP() os.Exit(0) } + startGus() + // go NewWatchdog() + go startHTTP() + doGui() +} + +func startGus() { all := me.portmaps.All() for all.Scan() { pm := all.Next() @@ -80,9 +80,6 @@ func main() { log.Info("portmap enabled for port", pm.Localport, "to", pm.Dest) go gus3000(pm) } - // go NewWatchdog() - go startHTTP() - doGui() } // func doME(pm *Portmap, gus listener.Accept) { |
