Daemon

It’s super-easy writing a daemon in ruby with the daemon gem.

  • write the code inside a loop (use some sleep).
  • create the server-script by just requiring and initializing daemon.

Now you can use the server-script to:

  • start
  • stop
  • restart
  • status
  • run

..the code.
All boilerplate is taken care of. Pure bliss!