From owner-freebsd-questions Tue Oct 9 13:29:38 2001 Delivered-To: freebsd-questions@freebsd.org Received: from ns1.vagner.com (NS1.VAGNER.COM [204.120.36.11]) by hub.freebsd.org (Postfix) with ESMTP id 1166D37B409 for ; Tue, 9 Oct 2001 13:29:32 -0700 (PDT) Received: (from root@localhost) by ns1.vagner.com (8.11.2/8.11.6) id f99KTIE99281 for questions@freebsd.org; Tue, 9 Oct 2001 13:29:18 -0700 (MST) (envelope-from george@vagner.com) Received: from thunderbird (vsat-148-71-111-158.ssa4.mcl.starband.net [148.71.111.158]) by ns1.vagner.com (8.11.2/8.11.6av) with SMTP id f99KT9C99272 for ; Tue, 9 Oct 2001 13:29:11 -0700 (MST) (envelope-from george@vagner.com) Message-ID: <000801c15101$138dc5c0$0100a8c0@thunderbird> From: "george" To: Subject: apache.sh PREFIX problem Date: Tue, 9 Oct 2001 13:29:06 -0700 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0005_01C150C6.5E766A50" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Virus-Scanned: by AMaViS perl-10 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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
I can start apache manually but my = installled=20 apache.sh wont start it
it pukes on
 
laptop# ./apache.sh
./apache.sh: = Cannot=20 determine the PREFIX
laptop#
 
 
here is the apache.sh file that was = installed using=20 the ports.
I suspect its something in that = "\(/.*\)/etc mess=20 but i am not a scripter and
have no idea what to put in there or = take out for=20 that matter...
 
 
 
 
 
laptop# cat = apache.sh
#!/bin/sh
 
if ! PREFIX=3D$(expr $0 :=20 "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then
    echo = "$0:=20 Cannot determine the PREFIX" >&2
    exit=20 1
fi
 
case "$1"=20 in
start)
        [ -x=20 ${PREFIX}/sbin/apachectl ] && ${PREFIX}/sbin/apachectl start = >=20 /dev
/null && echo -n '=20 apache'
       =20 ;;
stop)
        [ -r=20 /var/run/httpd.pid ] && ${PREFIX}/sbin/apachectl stop > = /dev/null=20 &
& echo -n ' = apache'
       =20 ;;
*)
        echo "Usage: = `basename=20 $0` {start|stop}" = >&2
       =20 ;;
esac
 
exit 0
------=_NextPart_000_0005_01C150C6.5E766A50-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message