From owner-freebsd-rc@FreeBSD.ORG Tue Feb 6 02:30:48 2007 Return-Path: X-Original-To: freebsd-rc@freebsd.org Delivered-To: freebsd-rc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CE88C16A408; Tue, 6 Feb 2007 02:30:45 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (grnl-static-02-0046.dsl.iowatelecom.net [69.66.56.110]) by mx1.freebsd.org (Postfix) with ESMTP id 77D4013C467; Tue, 6 Feb 2007 02:30:43 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (localhost [127.0.0.1]) by lor.one-eyed-alien.net (8.13.8/8.13.8) with ESMTP id l162Ug62055271; Mon, 5 Feb 2007 20:30:42 -0600 (CST) (envelope-from brooks@lor.one-eyed-alien.net) Received: (from brooks@localhost) by lor.one-eyed-alien.net (8.13.8/8.13.8/Submit) id l162UfF5055270; Mon, 5 Feb 2007 20:30:41 -0600 (CST) (envelope-from brooks) Date: Mon, 5 Feb 2007 20:30:41 -0600 From: Brooks Davis To: "Cwalinski, Zygmunt" Message-ID: <20070206023041.GA55215@lor.one-eyed-alien.net> References: <5CD1A0226571E74A830A15192855981801964460@CSYS-EVS01.corp.metroland.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="liOOAslEiF7prFVr" Content-Disposition: inline In-Reply-To: <5CD1A0226571E74A830A15192855981801964460@CSYS-EVS01.corp.metroland.com> User-Agent: Mutt/1.5.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (lor.one-eyed-alien.net [127.0.0.1]); Mon, 05 Feb 2007 20:30:42 -0600 (CST) Cc: Brooks Davis , freebsd-rc@freebsd.org Subject: Re: I need help with Script running as a daemon !!! X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 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: Tue, 06 Feb 2007 02:30:48 -0000 --liOOAslEiF7prFVr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable [Please don't top-post. It's considered rude on FreeBSD mailing lists.] On Mon, Feb 05, 2007 at 07:10:28PM -0500, Cwalinski, Zygmunt wrote: > Dave,=20 > Thanks for your email. I have set execute bit and change the script to: >=20 > name=3D"runtest" > pidfile=3D"/var/run/${name}.pid" > rcvar=3D`set_rcvar` > start_cmd=3Druntest_start > command=3D"/etc/runtest" > command_interpreter=3Dwhile > load_rc_config $name > runtest_enable=3D${runtest_enable-:NO} >=20 > runtest_start() { > $command & > echo $! > ${pidfile} > } >=20 > I get no error when I start this script but still when I am trying to > stop the daemon I am getting the following error: > runtest not running? (check /var/run/runtest.pid). >=20 > (pidfile contains a correct process ID) The value of command_interpreter is bogus. From your previous post, it should probably be /bin/sh. That shouldn't be fatal in an of it self though. What does "ps auxww | grep `cat /var/run/runtest.pid`" say? Also, what version of FreeBSD are you running? -- Brooks --liOOAslEiF7prFVr Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFFx+hRXY6L6fI4GtQRApnUAJ9Dek3PcIyJHdZNfOsU5tAhjK+Z1gCcDvTW enPazcuyPRqE83z6tDH79Dc= =Vd57 -----END PGP SIGNATURE----- --liOOAslEiF7prFVr--