From owner-freebsd-questions@FreeBSD.ORG Mon Feb 11 16:33:42 2008 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 EC17116A49A for ; Mon, 11 Feb 2008 16:33:42 +0000 (UTC) (envelope-from fbsd06+TA=8e6348a1@mlists.homeunix.com) Received: from turtle-out.mxes.net (turtle-out.mxes.net [216.86.168.191]) by mx1.freebsd.org (Postfix) with ESMTP id C48DF13C4E1 for ; Mon, 11 Feb 2008 16:33:42 +0000 (UTC) (envelope-from fbsd06+TA=8e6348a1@mlists.homeunix.com) Received: from mxout-03.mxes.net (mxout-03.mxes.net [216.86.168.178]) by turtle-in.mxes.net (Postfix) with ESMTP id 58A671642F8 for ; Mon, 11 Feb 2008 11:09:32 -0500 (EST) Received: from gumby.homeunix.com. (unknown [87.81.140.128]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.mxes.net (Postfix) with ESMTP id 54E3523E4C7 for ; Mon, 11 Feb 2008 11:09:28 -0500 (EST) Date: Mon, 11 Feb 2008 16:09:25 +0000 From: RW To: freebsd-questions@freebsd.org Message-ID: <20080211160925.60e445ca@gumby.homeunix.com.> In-Reply-To: <7d4569950802110156t2b59e568y2dda415fa18776d6@mail.gmail.com> References: <7d4569950802110156t2b59e568y2dda415fa18776d6@mail.gmail.com> X-Mailer: Claws Mail 3.0.2 (GTK+ 2.12.7; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: problem while stoping a service using script 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: Mon, 11 Feb 2008 16:33:43 -0000 On Mon, 11 Feb 2008 15:26:00 +0530 "lokesh babu" wrote: > hi > > i want to know how to stop a service from a script > this is the sample script to stop and start a service in linux,when i > kept faststart then starting a service is working in freebsd > similarly i want to know what to do inorder to stop a service in > freebsd. > > start|--start | faststart) > do_start > ;; > stop|--stop) > do_stop > If you want to write a script like this you can just give it a .sh extension and put it in /usr/local/etc/rc.d/. There's more in the rc manpage if you want to do it the modern way. However, if your script is in /etc/rc.d (which is intended for system rcng scripts) and is getting faststart, but not faststop, then I'd be interested to know. This has broken for me in the last week or so, and I'd like to know whether it's a bug or a local problem.