From 8e60488e7770039679b3d922ce9ae8ceea67201b Mon Sep 17 00:00:00 2001 From: Daniel Theophanes Date: Sun, 3 Mar 2013 17:18:51 -0800 Subject: [PATCH] Call init on run. --- stdservice/stdservice.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/stdservice/stdservice.go b/stdservice/stdservice.go index 627074a..40236b4 100644 --- a/stdservice/stdservice.go +++ b/stdservice/stdservice.go @@ -90,6 +90,13 @@ func Run(c *Config) { c.Stop(c) } }() + if c.Init != nil { + err := c.Init(c) + if err != nil { + c.l.Error(err.Error()) + return + } + } c.Start(c) case "start": err = s.Start()