From owner-freebsd-stable Thu Dec 27 12:51:50 2001 Delivered-To: freebsd-stable@freebsd.org Received: from voi.aagh.net (pc1-hart4-0-cust168.mid.cable.ntl.com [62.254.84.168]) by hub.freebsd.org (Postfix) with ESMTP id 40BB037B416 for ; Thu, 27 Dec 2001 12:51:41 -0800 (PST) Received: from freaky by voi.aagh.net with local (Exim 3.33 #1) id 16JhV5-000LcK-00 for freebsd-stable@FreeBSD.ORG; Thu, 27 Dec 2001 20:51:39 +0000 Date: Thu, 27 Dec 2001 20:51:39 +0000 From: Thomas Hurst To: freebsd-stable@FreeBSD.ORG Subject: Re: /usr/local/etc/rc.d/apache.sh question Message-ID: <20011227205139.GA82499@voi.aagh.net> Mail-Followup-To: freebsd-stable@FreeBSD.ORG References: <004001c18efd$5627bf00$245b1486@hhlaw.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <004001c18efd$5627bf00$245b1486@hhlaw.com> User-Agent: Mutt/1.3.24i Organization: Not much. X-Operating-System: FreeBSD/4.5-PRERELEASE (i386) X-Uptime: 8:45PM up 7 days, 5:30, 4 users, load averages: 2.06, 2.03, 2.00 Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG * Peter/Los Angeles, CA (peter@haloflightleader.net) wrote: > ./apache.sh: Cannot determine the PREFIX > if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then > echo "$0: Cannot determine the PREFIX" >&2 Note that $0 (argv[0] in C, i.e. the 'zeroth' argument) is the filename the program was called as. In this case it's trying to work out what the prefix is (/usr/local, /usr/pkg, etc), by looking at how it was called; since yours is unlikely to change you can replace it with a simple 'PREFIX=/usr/local', which will let you call it as ./apache.sh. With apache, though, I usually just use apachectl; apachectl start Wish more daemons would come with programs like that :) -- Thomas 'Freaky' Hurst - freaky@aagh.net - http://www.aagh.net/ - Your computer account is overdrawn. Please reauthorize. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message