aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/main.go b/main.go
index 339f6c7..e6c3f82 100644
--- a/main.go
+++ b/main.go
@@ -151,6 +151,7 @@ func readRegistration(file string) mxlib.Registration {
func main() {
flag.Parse()
+ // Read configuration
config_file := readConfig()
config = &config_file
@@ -163,13 +164,12 @@ func main() {
reg_file := readRegistration(config.Registration)
registration = &reg_file
- errch, err := StartAppService()
- if err != nil {
- log.Fatal(err)
- }
-
- StartWeb()
+ // Start appservice and web management interface
+ errch := make(chan error)
+ StartAppService(errch)
+ StartWeb(errch)
+ // Wait for an error somewhere
err = <-errch
if err != nil {
log.Fatal(err)