Subject: Re: Managing identical multiple daemons with a single rc.d script?
To: None <firstname.lastname@example.org>
From: Geert Hendrickx <email@example.com>
Date: 01/19/2007 08:58:32
On Thu, Jan 18, 2007 at 10:53:01AM -0800, Marc Tooley wrote:
> The primary problem is that in some cases (mine for example) you actually
> do need to run twelve, thirteen, or twenty instances simultaneously and
> the ability to run:
> /etc/rc.d/p4d checkpoint
> ... without additional arguments is *so* useful. Or, if you want to run
> it against just a single one:
> /etc/rc.d/p4d checkpoint test_2001.1
> Overview of Features
> Usage: /etc/rc.d/p4d [fast|force|one](start stop restart rcvar
> checkpoint upgrade refresh verifydb status poll) [main test992 test011
> test012 test021 test022 test031 test032 test042 test051 test052 test061
> . Can checkpoint cleanly.
> . Is aware of unclean shutdowns (machine crashes for example.)
> . Can upgrade cleanly.
> . Can refresh the db.* files which repacks them optimally for space and
> read-speed purposes.
> . Can run a verification -xv to check db.* consistency.
> . Is pretty smart about killing and restarting its daemons.
> . Additional daemons can be instantly configured or destroyed with
> Comments much appreciated.
Very interesting. A few questions though: where are the various instances
(the testxyz in your case) defined? In the daemon's configuration, or in
rc.d (rc.conf.d) configuration? Can the various instances have different
configuration files, or do they all use the same configuration file? I'd
be interested in setting up multiple apache instances this way (listening
on localhost, all proxied by one "master" instance listening on the public
interface). Would it be possible to give non-root users permission to
start/stop/restart "their" instance?