summaryrefslogtreecommitdiff
path: root/src/rhctl/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/rhctl/main.go')
-rw-r--r--src/rhctl/main.go22
1 files changed, 18 insertions, 4 deletions
diff --git a/src/rhctl/main.go b/src/rhctl/main.go
index 2aaf7aa..923a287 100644
--- a/src/rhctl/main.go
+++ b/src/rhctl/main.go
@@ -78,6 +78,8 @@ func main() {
rhl.Printf("just started...")
rhdl.Printf("configuration: %+v", conf)
+ //**************************************************
+ // initializing essential parts
sw, err := SwitchInit(conf)
if err != nil {
rhl.Println("error initializing audio switch: ", err)
@@ -93,13 +95,17 @@ func main() {
}
servers = append(servers, server)
}
- if len(servers) <= 0 {
- rhl.Printf("Error: there is no playout server configured...")
- return
- }
+ // if len(servers) <= 0 {
+ // rhl.Printf("Error: there is no playout server configured...")
+ // return
+ // }
ctrl := SwitchControlInit(conf, sw, servers)
+ // running non-essential parts aka clients
+ telnet := TelnetInit(conf, ctrl)
+
+ //**************************************************
// running essential parts
stop := make(chan bool)
@@ -126,6 +132,14 @@ func main() {
stop <- true
}()
+ // running non-essential parts aka clients
+ if conf.Clients.Telnet.Address != "" {
+ rhl.Printf("starting telnet interface")
+ telnet.Run()
+ rhl.Printf("telnet interface just stopped")
+ }
+
+ //**************************************************
<-stop
rhl.Printf("at least one essential part has stopped - bringing down the whole process")
}