From owner-freebsd-questions@FreeBSD.ORG Tue Oct 9 01:22:29 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 57FF816A41A for ; Tue, 9 Oct 2007 01:22:29 +0000 (UTC) (envelope-from philip@ridecharge.com) Received: from exhub015-1.exch015.msoutlookonline.net (exhub015-1.exch015.msoutlookonline.net [207.5.72.93]) by mx1.freebsd.org (Postfix) with ESMTP id 47D9313C448 for ; Tue, 9 Oct 2007 01:22:29 +0000 (UTC) (envelope-from philip@ridecharge.com) Received: from [192.168.0.66] (68.33.62.187) by smtpx15.msoutlookonline.net (207.5.72.103) with Microsoft SMTP Server (TLS) id 8.0.730.1; Mon, 8 Oct 2007 18:22:28 -0700 Message-ID: <470AD780.30702@ridecharge.com> Date: Mon, 8 Oct 2007 21:21:04 -0400 From: "Philip M. Gollucci" User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: Stephen Allen References: <470AB2FC.8070006@rowyerboat.com> <6.0.0.22.2.20071008183414.025a1e88@mail.computinginnovations.com> <470AD44A.4070601@rowyerboat.com> In-Reply-To: <470AD44A.4070601@rowyerboat.com> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Cc: FreeBSD Questions Subject: Re: Question about rc-scripts X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Oct 2007 01:22:29 -0000 > Again, I thought the rc.subr functions took care of all that for you > (unless you wanted something special from those commands). > In general, they do see /etc/rc.subr: check_pidfile(), wait_for_pids(), Most binaries i.e. httpd, memcached, mysqld, etc... provide a config file or cli option to provide the path to a pid file. If you look in the ports tree a lot of the patches are putting this in the appropriate location: /var/run The rc.subr then just uses them. In general this system is very flexible. It breaks down if you wanted to run say 2 distinct memcached daemons on different ports with different pid files via the /usr/local/etc/rc.d/