dctl - a daemon controller written in Ruby
dctl is a small script for providing daemon functionnalty (start, stop, …) to non-daemon process or script, with automatic handling of pidfiles. dctl is mainly an extended rewrite of the daemons project for learning purpose. It is designed to be small and smart (“less-is-more” philosophy), generic, and well-tested.
Convert any executable file with endless lifecycle into a controllable daemon
Automatic handling of pidfiles
Command-oriented style (dctl requires cmdparser >= 1.0.1)
Start a daemon with redirection of stdout in file 'out'
% dctl start -oout test/infinite.sh
Get the status of some daemons (here, infinite.sh and sleep)
% dctl status test/infinite.sh sleep
Stop a daemon
% dctl stop test/infinite.sh
Get the status of all daemons
The latest version of dctl can be found at :
Installation with RubyGems:
$ su # gem install dctl
Installation without RubyGems:
$ tar xfz dctl-x.x.x.tar.gz $ cd dctl-x.x.x $ su # ruby setup.rb
Please note that dctl test suite only succeeds if launched by a non-root user !
I'm thinking about dctl as a system service manager…
Written in 2005 by Bruno Carnazzi <[email protected]>
License and copyright
dctl is free software. You can redistribute it under the terms specified in the COPYING file of the Ruby distribution.