aboutsummaryrefslogtreecommitdiffstats
path: root/lib/syncthing/st.go
diff options
context:
space:
mode:
authorSebastien Douheret <sebastien.douheret@iot.bzh>2017-10-11 00:24:02 +0200
committerSebastien Douheret <sebastien.douheret@iot.bzh>2017-10-11 00:24:02 +0200
commit4695555e178bcabe54c5bf82117c9c4cef5440b5 (patch)
tree96a8721de74347450b2e4922004b1bf01e415dfa /lib/syncthing/st.go
parent882944a748d123c8715eca88536299d8570858f9 (diff)
Fixed Syncthing folder status events and exec command.
Diffstat (limited to 'lib/syncthing/st.go')
-rw-r--r--lib/syncthing/st.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/syncthing/st.go b/lib/syncthing/st.go
index 304cfca..924f407 100644
--- a/lib/syncthing/st.go
+++ b/lib/syncthing/st.go
@@ -119,7 +119,7 @@ func NewSyncThing(conf *xdsconfig.Config, log *logrus.Logger) *SyncThing {
}
// Create Events monitoring
- // SEB TO TEST s.Events = s.NewEventListener()
+ s.Events = s.NewEventListener()
return &s
}
@@ -130,7 +130,7 @@ func (s *SyncThing) startProc(exeName string, args []string, env []string, eChan
var exePath string
// Kill existing process (useful for debug ;-) )
- if os.Getenv("DEBUG_MODE") != "" {
+ if _, dbg := os.LookupEnv("XDS_DEBUG_MODE"); dbg {
fmt.Printf("\n!!! DEBUG_MODE set: KILL existing %s process(es) !!!\n", exeName)
exec.Command("bash", "-c", "ps -ax |grep "+exeName+" |grep "+s.BaseURL+" |cut -d' ' -f 1|xargs -I{} kill -9 {}").Output()
}
@@ -227,7 +227,7 @@ func (s *SyncThing) Start() (*exec.Cmd, error) {
"STNOUPGRADE=1",
}
- /* SEB STILL NEEDED, if not SUP code
+ /* FIXME - STILL NEEDED ?, if not SUP code
// XXX - temporary hack because -gui-apikey seems to correctly handle by
// syncthing the early first time
@@ -371,7 +371,7 @@ func (s *SyncThing) Connect() error {
s.Connected = true
// Start events monitoring
- //SEB TODO err = s.Events.Start()
+ err = s.Events.Start()
return err
}