1

I would like to use the ringo/daemon module to create daemon processes in RingoJS. However there doesn't seem to be sufficient documentation on how to do so, and I'm really confused. Any help would be greatly appreciated. Perhaps someone could link me to a page which explains how to get it done.

Aadit M Shah
  • 72,912
  • 30
  • 168
  • 299

1 Answers1

2

ringo/daemon is meant to be used in combination with the Debian init script from the ringo-daemon.deb package. In that context, the init function will be called with superuser id so it can do things like listen on privileged TCP ports, while start is called using an ordinary user id to start server threads.

Running Ringo from the command line will also call the init and start functions if a module provides them, but stop and destroy are currently not called for command line scripts.

I'm not sure if/how general support for launching daemon processes could be introduced to RingoJS, bbut I'm open to suggestions.

  • The Debian init script can only be installed on Debian and Ubuntu right? Is there any way to get it to work on Fedora 13? All that's required is to copy the `ringojs` bash script to the `/etc/init.d/` directory and set the defaults in the `/etc/default/` directory if I'm not mistaken. Also, if you wish to create multiple daemon processes, how do we tackle that problem? – Aadit M Shah Jan 08 '12 at 05:43