From owner-freebsd-rc@freebsd.org Thu Feb 11 09:48:18 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 C57EAAA4AA2 for ; Thu, 11 Feb 2016 09:48:18 +0000 (UTC) (envelope-from lars@e-new.0x20.net) Received: from mail.0x20.net (mail.0x20.net [217.69.76.211]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.0x20.net", Issuer "mail.0x20.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 8B295147D for ; Thu, 11 Feb 2016 09:48:18 +0000 (UTC) (envelope-from lars@e-new.0x20.net) Received: from e-new.0x20.net (mail.0x20.net [IPv6:2001:aa8:fffb:1::3]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.0x20.net (Postfix) with ESMTPS id 6A6726DF91B; Thu, 11 Feb 2016 10:48:15 +0100 (CET) Received: from e-new.0x20.net (localhost [127.0.0.1]) by e-new.0x20.net (8.14.7/8.14.7) with ESMTP id u1B9mEqE078290; Thu, 11 Feb 2016 10:48:14 +0100 (CET) (envelope-from lars@e-new.0x20.net) Received: (from lars@localhost) by e-new.0x20.net (8.14.7/8.14.7/Submit) id u1B9mDtp077782; Thu, 11 Feb 2016 10:48:13 +0100 (CET) (envelope-from lars) Date: Thu, 11 Feb 2016 10:48:13 +0100 From: Lars Engels To: Garrett Wollman Cc: freebsd-rc@freebsd.org Subject: Re: Good example for startup script with multiple "profiles"? Message-ID: <20160211094813.GR68362@e-new.0x20.net> References: <22203.48400.34474.502294@hergotha.csail.mit.edu> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="CEMZpvf/LsJ++1SB" Content-Disposition: inline In-Reply-To: <22203.48400.34474.502294@hergotha.csail.mit.edu> X-Editor: VIM - Vi IMproved 7.4 X-Operation-System: FreeBSD 8.4-RELEASE-p23 User-Agent: Mutt/1.5.23 (2014-03-12) 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: Thu, 11 Feb 2016 09:48:18 -0000 --CEMZpvf/LsJ++1SB Content-Type: text/plain; charset=utf-8 Content-Disposition: inline On Wed, Feb 10, 2016 at 05:43:28PM -0500, 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? The tomcat ports rc scripts have: # You may symlink this script with other names to run multiple # instances of tomcat8 with different configurations. --CEMZpvf/LsJ++1SB Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQF8BAEBCgBmBQJWvFjdXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ4RjQwMDE3RTRERjUzMTI1N0FGRTUxNDlF NTRDQjM3RDNBMDg5RDZEAAoJEOVMs306CJ1tryIH/1U9DFI1n7nU90A13gqCRRvq cCibnZfh2yTBXYbbg+8KvraXYrmj6Shoey2wveIh4Y39Yc5jA36CPY6dXN4PmgTX 6Ryej0BYhAQz1emvmx9RgFRiQ+qVg592SFshZMutDv9bc22aueXpp6Gx/zXSGE4t 8bwx1tF37QPRfSpqaQjSjOjOzqBWJeO9KdWUa/bxyOkkpX7IQgeTUPTE2MVLy2RA mk3o11cP4qdclTGoP8QtVQWufpB85S4toSjwmcHhNYkUbkTNJbD9gP6Vl9sgOFe+ 0wxc3jwetkWiRRK4/S6jNa39zMpknDPyjiT8Fc9hg74cMcdDOpuG6tG5XlP4UQs= =2aqY -----END PGP SIGNATURE----- --CEMZpvf/LsJ++1SB--