From owner-freebsd-ports@FreeBSD.ORG Tue Jun 25 20:41:04 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 30F197EC; Tue, 25 Jun 2013 20:41:04 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: from mail-wg0-x236.google.com (mail-wg0-x236.google.com [IPv6:2a00:1450:400c:c00::236]) by mx1.freebsd.org (Postfix) with ESMTP id 6E1A41603; Tue, 25 Jun 2013 20:41:03 +0000 (UTC) Received: by mail-wg0-f54.google.com with SMTP id n11so9983799wgh.9 for ; Tue, 25 Jun 2013 13:41:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=MgiLg/jIt0eeYj8QZPCQ7KYHXEK3dCaKYpF+4b3wBlc=; b=J9OcvungpsMB82UjIH778Nrgo518bHkXuk3PMP+kUay4YdCaEIPFf2rSMo9+fK5ZXU 8hybwDBOFZWyEhPscpHKZ92jqfUI4kR/2DrjTbwshJ1bDh0n9dC661YUnV6LeJDFiQDX WoSkylVXvh/++Yqc4EtxgZ7N1XsKFotXott2OlmyOolFb3nrBlMIJJ6om48tdlb/B0jh s2gZT3CpQ40puIRAcmXQbpPkcBouDdGCYs1beudoEooY58fPAQjSGGGVie0+NJp+V4AM K55OxHpqfQy3GvKIdfjlVUPeTJv65D4Sb2zN0V8xDlp8XAyNH0Z0WvYvdXnAmgAYDINN WP7g== X-Received: by 10.180.87.162 with SMTP id az2mr10408922wib.10.1372192862675; Tue, 25 Jun 2013 13:41:02 -0700 (PDT) Received: from ithaqua.etoilebsd.net (ithaqua.etoilebsd.net. [37.59.37.188]) by mx.google.com with ESMTPSA id s19sm6538245wik.11.2013.06.25.13.41.01 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 25 Jun 2013 13:41:01 -0700 (PDT) Sender: Baptiste Daroussin Date: Tue, 25 Jun 2013 22:40:59 +0200 From: Baptiste Daroussin To: Garrett Wollman Subject: Re: rc.d scripts to control multiple instances of the same daemon? Message-ID: <20130625204059.GE93612@ithaqua.etoilebsd.net> References: <20937.62239.626943.350086@hergotha.csail.mit.edu> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="mR8QP4gmHujQHb1c" Content-Disposition: inline In-Reply-To: <20937.62239.626943.350086@hergotha.csail.mit.edu> User-Agent: Mutt/1.5.21 (2010-09-15) 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:41:04 -0000 --mR8QP4gmHujQHb1c Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jun 25, 2013 at 03:44:31PM -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: >=20 > 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. >=20 > 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? >=20 > -GAWollman >=20 > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" This is a simple multi instance rc.d script: http://svnweb.freebsd.org/ports/head/www/fcgiwrap/files/fcgiwrap.in?revisio= n=3D307542&view=3Dmarkup regards, Bapt --mR8QP4gmHujQHb1c Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlHKAFsACgkQ8kTtMUmk6ExvigCgoz3XDihcKC/fS3u1vpTm0ZLZ SO4AoKLFTTIINM+PNjz48h57lyimXcBM =EHLw -----END PGP SIGNATURE----- --mR8QP4gmHujQHb1c--