From owner-freebsd-ports@FreeBSD.ORG Tue Jun 25 20:12:18 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 A8498A4E; Tue, 25 Jun 2013 20:12:18 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mho-02-ewr.mailhop.org (mho-02-ewr.mailhop.org [204.13.248.72]) by mx1.freebsd.org (Postfix) with ESMTP id 804EE12BC; Tue, 25 Jun 2013 20:12:18 +0000 (UTC) Received: from c-24-8-230-52.hsd1.co.comcast.net ([24.8.230.52] helo=damnhippie.dyndns.org) by mho-02-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1UrZb2-0005bD-66; Tue, 25 Jun 2013 20:12:12 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id r5PKC9Pl001014; Tue, 25 Jun 2013 14:12:09 -0600 (MDT) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 24.8.230.52 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX19JCODgVcEHrM5GTHs+uewb Subject: Re: rc.d scripts to control multiple instances of the same daemon? From: Ian Lepore To: Garrett Wollman In-Reply-To: <20937.62239.626943.350086@hergotha.csail.mit.edu> References: <20937.62239.626943.350086@hergotha.csail.mit.edu> Content-Type: text/plain; charset="us-ascii" Date: Tue, 25 Jun 2013 14:12:09 -0600 Message-ID: <1372191129.1109.90.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit 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 20:12:18 -0000 On Tue, 2013-06-25 at 15:44 -0400, 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? The one like that I use the most is "service netif restart fpx0" but I'm not sure the complex network stuff will be the cleanest example of anything except how to do complex network stuff. :) -- Ian