GithubHelp home page GithubHelp logo

Comments (3)

wez avatar wez commented on April 19, 2024

You shouldn't need to do this. Watchman will detach and put itself in the background when it starts up.
If you need to run it under a supervisor, you should probably use the --foreground option.

Note that the watchman model is one service per user. Launching a root-owned watchman on startup will only benefit the root user.

We use https://bitbucket.org/wez/gimli to maintain and supervise our watchman processes per user. You can enable this at compile time if you run ./configure --with-gimli

from watchman.

wez avatar wez commented on April 19, 2024

just scrolled right to read what you're running.
Watches are persistent, so you should probably do:

/var/bi/bin/watchman watch /var/bi/var/dbf
/var/bi/bin/watchman -- trigger /var/bi/var/dbf importPr "*.DBF" "*.dbf" -- /var/bi/bicmd importPr

once to set it up, then have your upstart script be something like:

script
  exec sudo -u root /var/bi/bin/watchman --foreground
end script

from watchman.

jeffreycahyono avatar jeffreycahyono commented on April 19, 2024

@wez Thanks for your helpful response. --foreground works! In my system watches are reseted on system startup. But ----statefile can fix that. Now my upstart config is like this and it worked.

description "Watchman service"

start on started beanstalkd
stop on stopping beanstalkd

script
    exec sudo -u root /var/bi/bin/watchman --statefile=/var/bi/.watchman.root.state --logfile=/var/bi/var/log/watchman.log --foreground
end script

from watchman.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.