From owner-freebsd-questions Thu Jul 25 1:39:31 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BB98937B400 for ; Thu, 25 Jul 2002 01:39:27 -0700 (PDT) Received: from smaug.rhavenn.net (smaug.rhavenn.net [209.150.195.53]) by mx1.FreeBSD.org (Postfix) with ESMTP id C5C0643E4A for ; Thu, 25 Jul 2002 01:39:26 -0700 (PDT) (envelope-from lists@rhavenn.net) Received: from ashram.rhavenn.net (2d30ffc1ee241b6ab4b50c9e48679bcd@ashram.rhavenn.net [209.150.195.50]) by smaug.rhavenn.net (8.12.1/8.12.1) with ESMTP id g6P8g8CF008065; Thu, 25 Jul 2002 03:42:08 -0500 (CDT) Content-Type: text/plain; charset="iso-8859-1" From: Henrik Hudson Reply-To: lists@rhavenn.net To: "Erik Mattsson" , Subject: Re: Newbie question about apache Date: Thu, 25 Jul 2002 03:45:51 -0500 User-Agent: KMail/1.4.2 References: <008701c233b5$1fd69950$0800a8c0@imbridge.se> In-Reply-To: <008701c233b5$1fd69950$0800a8c0@imbridge.se> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200207250345.51348.lists@rhavenn.net> 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 "Userland" startup scripts (ie: the ones created by the admin) go in: =09/usr/local/etc/rc.d Create a shell script, for this example: apache.sh and then chmod 755 it= =2E Note: The files HAVE to be called something.sh and they HAVE to be chmod = 755 =20 otherwise they don't work. Note: Use the apachectl script to start and stop apache. Just had a thoug= ht..=20 I haven't used Apache 2 yet..so don't know if this will work..but I do th= e=20 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=3D$1 # start or stop case "$mode" in =20 'start') # Start daemon /path/to/apachectlscript/apachectl start =20 ;; =20 =20 'stop') =09#Stop daemon =09/path/to/apachectlscript/apachectl stop ;; =20 *) # 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, B= UT > how do i force it to run as the www user? > > //erik > --------------------------------------------------------------------- > Erik Mattsson > > imBridge AB > Vasaplatsen 8 > SE-411 34 G=F6teborg > > 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 --=20 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