Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Dec 2001 20:51:39 +0000
From:      Thomas Hurst <tom.hurst@clara.net>
To:        freebsd-stable@FreeBSD.ORG
Subject:   Re: /usr/local/etc/rc.d/apache.sh question
Message-ID:  <20011227205139.GA82499@voi.aagh.net>
In-Reply-To: <004001c18efd$5627bf00$245b1486@hhlaw.com>
References:  <004001c18efd$5627bf00$245b1486@hhlaw.com>

next in thread | previous in thread | raw e-mail | index | archive | help
* 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011227205139.GA82499>