From owner-freebsd-rc@freebsd.org Wed Feb 10 23:36:26 2016 Return-Path: Delivered-To: freebsd-rc@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3B525AA4363 for ; Wed, 10 Feb 2016 23:36:26 +0000 (UTC) (envelope-from milios@ccsys.com) Received: from cargobay.net (cargobay.net [198.178.123.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 17C671626 for ; Wed, 10 Feb 2016 23:36:25 +0000 (UTC) (envelope-from milios@ccsys.com) Received: from cargobay.net (cargobay.net [198.178.123.147]) by cargobay.net (Postfix) with ESMTPSA id 0A188B6; Wed, 10 Feb 2016 23:32:20 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 10 Feb 2016 18:32:19 -0500 From: "Chad J. Milios" To: Garrett Wollman Cc: freebsd-rc@freebsd.org Subject: Re: Good example for startup script with multiple "profiles"? Organization: Crop Circle Systems, Inc. In-Reply-To: <22203.48400.34474.502294@hergotha.csail.mit.edu> References: <22203.48400.34474.502294@hergotha.csail.mit.edu> Message-ID: X-Sender: milios@ccsys.com User-Agent: Roundcube Webmail/1.1.3 X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Feb 2016 23:36:26 -0000 On 2016-02-10 17:43, Garrett Wollman wrote: > It's sometimes useful to have a single rc script start multiple copies > of the same service, using different options. (For example, and my > use case here, running a monitoring daemon with different parameters > on "inside" and "outside" network interfaces.) Is there a good > example I can crib from for how best to code this up while taking > maximal advantage of the rc.subr framework? > > -GAWollman > _______________________________________________ > freebsd-rc@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-rc > To unsubscribe, send any mail to "freebsd-rc-unsubscribe@freebsd.org" Not saying this is the absolute best approach, but take a look at security/openvpn. that is after what i modeled my enhancement to the dns/knot2 startup script in https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=203931 . i think the diff in that PR would make a good example of what youre looking to accomplish, clearly illustrating the actual modification. knot2 is rather simple software so nothing's in the way to obscure the illustrative value youre looking for, yet it also has the extra control function in there referencing the knotc control utility executable