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>
next in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
------=_NextPart_000_0005_01C150C6.5E766A50
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
I can start apache manually but my installled apache.sh wont start it=20
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=3D$(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
------=_NextPart_000_0005_01C150C6.5E766A50
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2600.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>I can start apache manually but my =
installled=20
apache.sh wont start it </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>it pukes on</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>laptop# ./apache.sh<BR>./apache.sh: =
Cannot=20
determine the PREFIX<BR>laptop#</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>here is the apache.sh file that was =
installed using=20
the ports.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I suspect its something in that =
"\(/.*\)/etc mess=20
but i am not a scripter and</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>have no idea what to put in there or =
take out for=20
that matter...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>laptop# cat =
apache.sh<BR>#!/bin/sh</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>if ! PREFIX=3D$(expr $0 :=20
"\(/.*\)/etc/rc\.d/$(basename $0)\$"); then<BR> echo =
"$0:=20
Cannot determine the PREFIX" >&2<BR> exit=20
1<BR>fi</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>case "$1"=20
in<BR>start)<BR> [ -x=20
${PREFIX}/sbin/apachectl ] && ${PREFIX}/sbin/apachectl start =
>=20
/dev<BR>/null && echo -n '=20
apache'<BR> =20
;;<BR>stop)<BR> [ -r=20
/var/run/httpd.pid ] && ${PREFIX}/sbin/apachectl stop > =
/dev/null=20
&<BR>& echo -n ' =
apache'<BR> =20
;;<BR>*)<BR> echo "Usage: =
`basename=20
$0` {start|stop}" =
>&2<BR> =20
;;<BR>esac</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>exit 0</FONT></DIV></BODY></HTML>
------=_NextPart_000_0005_01C150C6.5E766A50--
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?000801c15101$138dc5c0$0100a8c0>
