From owner-freebsd-questions Wed Feb 6 3:30:56 2002 Delivered-To: freebsd-questions@freebsd.org Received: from guru.mired.org (dsl-64-192-6-133.telocity.com [64.192.6.133]) by hub.freebsd.org (Postfix) with SMTP id 2C55F37B421 for ; Wed, 6 Feb 2002 03:30:50 -0800 (PST) Received: (qmail 12966 invoked by uid 100); 6 Feb 2002 11:30:49 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15457.5097.48643.706161@guru.mired.org> Date: Wed, 6 Feb 2002 05:30:49 -0600 To: Lord Raiden Cc: questions@freebsd.org Subject: Re: Easist way to Reload special configs?? In-Reply-To: <106737096@toto.iv> X-Mailer: VM 6.90 under 21.1 (patch 14) "Cuyahoga Valley" XEmacs Lucid X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`;h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ From: "Mike Meyer" X-Delivery-Agent: TMDA/0.44 (Python 2.2; freebsd-4.5-STABLE-i386) Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Lord Raiden 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. 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