daemons is a ruby script that provides an easy way to wrap existing ruby scripts to be run as a daemon.
Version: 10.0.10daemons is a ruby script that provides an easy way to wrap existing ruby scripts (for example a self-written server) to be run as a daemon and to be controlled by simple start/stop/restart commands. daemons can also run and control blocks of Ruby code in a daemon process.
Operating System: Linux
Besides this basic functionality, daemons offers many advanced features like exception backtracing and logging (in case your ruby script crashes) and monitoring and automatic restarting of your processes if they crash.
Installation with RubyGems:
# gem install daemons
Installation without RubyGems:
$ tar xfz daemons-x.x.x.tar.gz
$ cd daemons-x.x.x
# ruby setup.rb
What's New in This Release:
· By default, we now delete stray pid-files (i.e. pid-files which result for example from a killed daemon) automatically. This function can be deactivated by passing :keep_pid_files => true as an option.
· All pid files of :multiple daemons new get deleted correctly upon exit of the daemons (reported by Han Holl).
· Use the signal 'KILL' instead of 'TERM' on Windows platforms.
· Use exit! in trap('TERM') instead of exit when option :hard_exit is given (thanks to Han Holl).
· Did some clarification on the exception log.