"github.com/Sirupsen/logrus"
"github.com/codegangsta/cli"
"github.com/iotbzh/xds-agent/lib/agent"
"github.com/iotbzh/xds-agent/lib/syncthing"
"github.com/Sirupsen/logrus"
"github.com/codegangsta/cli"
"github.com/iotbzh/xds-agent/lib/agent"
"github.com/iotbzh/xds-agent/lib/syncthing"
ctx.Log.Infof("Starting Syncthing...")
ctx.SThgCmd, err = ctx.SThg.Start()
if err != nil {
return cli.NewExitError(err, 2)
}
ctx.Log.Infof("Starting Syncthing...")
ctx.SThgCmd, err = ctx.SThg.Start()
if err != nil {
return cli.NewExitError(err, 2)
}
ctx.Log.Infof("Starting Syncthing-inotify...")
ctx.SThgInotCmd, err = ctx.SThg.StartInotify()
if err != nil {
return cli.NewExitError(err, 2)
}
ctx.Log.Infof("Starting Syncthing-inotify...")
ctx.SThgInotCmd, err = ctx.SThg.StartInotify()
if err != nil {
return cli.NewExitError(err, 2)
}
ctx.Log.Infof("Local Syncthing ID: %s", id)
// Create and start Web Server
ctx.Log.Infof("Local Syncthing ID: %s", id)
// Create and start Web Server
if err = ctx.WWWServer.Serve(); err != nil {
log.Println(err)
return cli.NewExitError(err, 3)
if err = ctx.WWWServer.Serve(); err != nil {
log.Println(err)
return cli.NewExitError(err, 3)