diff options
-rw-r--r-- | cmd/dolmetschctld/dolmetschctld.go | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/cmd/dolmetschctld/dolmetschctld.go b/cmd/dolmetschctld/dolmetschctld.go index 783358d..0f6793b 100644 --- a/cmd/dolmetschctld/dolmetschctld.go +++ b/cmd/dolmetschctld/dolmetschctld.go @@ -51,11 +51,20 @@ func main() { var sm *StateMachine if sm, err = NewStateMachine(m); err != nil { - log.Printf("state machone successfully initialized!") + log.Printf("initializing state machine failed: %v", err) + os.Exit(1) } + log.Printf("state machine successfully initialized!") sm.Start() defer sm.Shutdown() + var telnet *TelnetInterface + if telnet, err = NewTelnetInterface(sm); err != nil { + log.Printf("creating telnet control interface failed: %v", err) + os.Exit(1) + } + telnet.Run() + log.Printf("exiting.") } |