From owner-freebsd-ports@FreeBSD.ORG Tue Jun 25 19:56:26 2013 Return-Path: Delivered-To: ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 0D860F6F for ; Tue, 25 Jun 2013 19:56:26 +0000 (UTC) (envelope-from ohauer@gmx.de) Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) by mx1.freebsd.org (Postfix) with ESMTP id A0F0C1184 for ; Tue, 25 Jun 2013 19:56:25 +0000 (UTC) Received: from mailout-de.gmx.net ([10.1.76.19]) by mrigmx.server.lan (mrigmx001) with ESMTP (Nemesis) id 0LfUkZ-1USuhd1lCT-00p8Rb for ; Tue, 25 Jun 2013 21:56:24 +0200 Received: (qmail invoked by alias); 25 Jun 2013 19:56:24 -0000 Received: from p578be941.dip0.t-ipconnect.de (EHLO [192.168.0.100]) [87.139.233.65] by mail.gmx.net (mp019) with SMTP; 25 Jun 2013 21:56:24 +0200 X-Authenticated: #1956535 X-Provags-ID: V01U2FsdGVkX1+tvalV52St3Ulr54PBWEK6g9XB9KhxPWF9FMi7Br VHzVXUnwYne1sg Message-ID: <51C9F5E7.1040607@gmx.de> Date: Tue, 25 Jun 2013 21:56:23 +0200 From: olli hauer User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/20130509 Thunderbird/17.0.6 MIME-Version: 1.0 To: Garrett Wollman Subject: Re: rc.d scripts to control multiple instances of the same daemon? References: <20937.62239.626943.350086@hergotha.csail.mit.edu> In-Reply-To: <20937.62239.626943.350086@hergotha.csail.mit.edu> X-Enigmail-Version: 1.5.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 Cc: ports@freebsd.org, hackers@freebsd.org X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Jun 2013 19:56:26 -0000 On 2013-06-25 21:44, Garrett Wollman wrote: > I'm in the process of (re)writing an rc.d script for kadmind > (security/krb5). Unlike the main Kerberos daemon, kadmind needs to > have a separate instance for each realm on the server -- it can't > support multiple realms in a single process. What I need to be able > to do: > > 1) Have different flags and pidfiles for each instance. > 2) Be able to start, stop, restart, and status each individual > instance by giving its name on the command line. > 3) Have all instances start/stop automatically when a specific > instance isn't specified. > > I've looked around for examples of good practice to emulate, and > haven't found much. The closest to what I want looks to be > vboxheadless, but I'm uncomfortable with the amount of mechanism from > rc.subr that it needs to reimplement. Are there any better examples? > > -GAWollman > Take a look into the openvpn rc script (works with softlinks). A more complex script that supports multiple instances can be found in the www/apache2x ports. -- olli