Date: Tue, 9 Oct 2001 13:29:06 -0700 From: "george" <george@vagner.com> To: <questions@freebsd.org> Subject: apache.sh PREFIX problem Message-ID: <000801c15101$138dc5c0$0100a8c0@thunderbird>
index | next in thread | raw e-mail
[-- Attachment #1 --]
I can start apache manually but my installled apache.sh wont start it
it pukes on
laptop# ./apache.sh
./apache.sh: Cannot determine the PREFIX
laptop#
here is the apache.sh file that was installed using the ports.
I suspect its something in that "\(/.*\)/etc mess but i am not a scripter and
have no idea what to put in there or take out for that matter...
laptop# cat apache.sh
#!/bin/sh
if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then
echo "$0: Cannot determine the PREFIX" >&2
exit 1
fi
case "$1" in
start)
[ -x ${PREFIX}/sbin/apachectl ] && ${PREFIX}/sbin/apachectl start > /dev
/null && echo -n ' apache'
;;
stop)
[ -r /var/run/httpd.pid ] && ${PREFIX}/sbin/apachectl stop > /dev/null &
& echo -n ' apache'
;;
*)
echo "Usage: `basename $0` {start|stop}" >&2
;;
esac
exit 0
[-- Attachment #2 --]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2600.0" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>I can start apache manually but my installled
apache.sh wont start it </FONT></DIV>
<DIV><FONT face=Arial size=2>it pukes on</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>laptop# ./apache.sh<BR>./apache.sh: Cannot
determine the PREFIX<BR>laptop#</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>here is the apache.sh file that was installed using
the ports.</FONT></DIV>
<DIV><FONT face=Arial size=2>I suspect its something in that "\(/.*\)/etc mess
but i am not a scripter and</FONT></DIV>
<DIV><FONT face=Arial size=2>have no idea what to put in there or take out for
that matter...</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>laptop# cat apache.sh<BR>#!/bin/sh</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>if ! PREFIX=$(expr $0 :
"\(/.*\)/etc/rc\.d/$(basename $0)\$"); then<BR> echo "$0:
Cannot determine the PREFIX" >&2<BR> exit
1<BR>fi</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>case "$1"
in<BR>start)<BR> [ -x
${PREFIX}/sbin/apachectl ] && ${PREFIX}/sbin/apachectl start >
/dev<BR>/null && echo -n '
apache'<BR>
;;<BR>stop)<BR> [ -r
/var/run/httpd.pid ] && ${PREFIX}/sbin/apachectl stop > /dev/null
&<BR>& echo -n ' apache'<BR>
;;<BR>*)<BR> echo "Usage: `basename
$0` {start|stop}" >&2<BR>
;;<BR>esac</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>exit 0</FONT></DIV></BODY></HTML>
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?000801c15101$138dc5c0$0100a8c0>
