X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=lib%2Fsyncthing%2Fst.go;h=924f4075774e0d17562e131039b6d98a46aef7e1;hb=4695555e178bcabe54c5bf82117c9c4cef5440b5;hp=304cfca5fe9af83c4cce78485c963d416fb9c835;hpb=882944a748d123c8715eca88536299d8570858f9;p=src%2Fxds%2Fxds-agent.git 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 }