Date: Thu, 25 Jul 2002 03:45:51 -0500 From: Henrik Hudson <lists@rhavenn.net> To: "Erik Mattsson" <erik.mattsson@imbridge.com>, <freebsd-questions@FreeBSD.ORG> Subject: Re: Newbie question about apache Message-ID: <200207250345.51348.lists@rhavenn.net> In-Reply-To: <008701c233b5$1fd69950$0800a8c0@imbridge.se> References: <008701c233b5$1fd69950$0800a8c0@imbridge.se>
index | next in thread | previous in thread | raw e-mail
"Userland" startup scripts (ie: the ones created by the admin) go in:
/usr/local/etc/rc.d
Create a shell script, for this example: apache.sh and then chmod 755 it.
Note: The files HAVE to be called something.sh and they HAVE to be chmod 755
otherwise they don't work.
Note: Use the apachectl script to start and stop apache. Just had a thought..
I haven't used Apache 2 yet..so don't know if this will work..but I do the
below for Apache 1.3 ... so it should be something similar
In the file do something like this:
START SCRIPT EXAMPLE
#!/bin/sh
#Script for starting and stapping apache
#Grab our command
mode=$1 # start or stop
case "$mode" in
'start')
# Start daemon
/path/to/apachectlscript/apachectl start
;;
'stop')
#Stop daemon
/path/to/apachectlscript/apachectl stop
;;
*)
# usage
echo "usage: $0 start|stop"
exit 1
;;
esac
END SCRIPT EXAMPLE
Hope that helps :)
Henrik
On Thursday 25 July 2002 03:27, Erik Mattsson wrote:
> Hi
>
> I've just installed the apache2 from /usr/ports/www, and I want this to run
> everytime when I reboot the machine. How do I do it?
>
> Ive also installed tomcat4.0 and want it to run at boot time as well, BUT
> how do i force it to run as the www user?
>
> //erik
> ---------------------------------------------------------------------
> Erik Mattsson
>
> imBridge AB
> Vasaplatsen 8
> SE-411 34 Göteborg
>
> Phone: +46-31-138310
> Mobile: +46-733-174116
> www.imbridge.com
>
>
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message
--
Henrik Hudson
lists@rhavenn.net
Note: Beware of Dragons - Thou art crunchy and taste good with ketchup.
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200207250345.51348.lists>
