Date: Tue, 16 Apr 2002 07:36:57 -0400 From: "Jonathan Arnold" <jdarnold@buddydog.org> To: freebsd-questions@FreeBSD.ORG Subject: Re: stupid question - safe way to start apache in rc.d Message-ID: <200204160736570383.220A6DAD@mail.attbi.com> In-Reply-To: <B8E20291.419%f3z@iprimus.com.au> References: <B8E20291.419%f3z@iprimus.com.au>
next in thread | previous in thread | raw e-mail | index | archive | help
>I have compiled apache from source (so that I can do customisations and= the >like) and would like it to start at boot time, what sort of script should= I When I did that, it automagically put the startup script into rc.d. Did you check to see if it was already there? Anyway, here's the script it put in there: =3D=3D=3D cut here =3D=3D=3D #!/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 -- Jonathan Arnold (mailto:jdarnold@buddydog.org) Daemon Dancing in the Dark, a FreeBSD weblog: http://jdarnold.tzo.com/FreeBSD 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?200204160736570383.220A6DAD>