Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Feb 2002 05:30:49 -0600
From:      "Mike Meyer" <mwm-dated-1013427049.364cf9@mired.org>
To:        Lord Raiden <raiden23@netzero.net>
Cc:        questions@freebsd.org
Subject:   Re: Easist way to Reload special configs??
Message-ID:  <15457.5097.48643.706161@guru.mired.org>
In-Reply-To: <106737096@toto.iv>

next in thread | previous in thread | raw e-mail | index | archive | help
Lord Raiden <raiden23@netzero.net> types:
> 	I'm working on a brainstorm idea for a system that will take several 
> different services on a given FreeBSD box (let's use Sendmail and JIT for 
> example) that normally require killing the process and restarting it for 
> new configurations, even the smallest ones, to take effect.

Why would you want to do this? Knowing that helps us provide a
solution that best solves your problems.

> 	I'm looking to find a way to make these programs automatically take the 
> new configurations ASAP or immediately if that can be done.  I know using 
> InetD you can take samba or Qpopper (pop3 mail daemon) and get them to 
> automatically accept any and all changes done to their configs 
> automatically without a restart of the service.

The reason these things run from inetd accept new configs ASAP is
because each connection runs the program for that server again,
causing it to reread all the config files. Nothing magic in that.

> 	Now, stating that, can I somehow figure out how to do this with say for 
> example Sendmail or JIT which normally run as their own processes and don't 
> require InetD?  I'm looking at needing to be able to have any programs like 
> these two to still be live and listening on a given port for commands, but 
> at the same time if I make configuration changes, I need them to take 
> effect immediately without requiring a restart of the service.  Any ideas?

The only way I can think of of doing what you're talking about is to
rewrite the listen loop to use kevents so you can watch for the
configuration file(s) to change as well as for connection
attempts.

	<mike
--
Mike Meyer <mwm@mired.org>			http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15457.5097.48643.706161>