"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 [EMAIL PROTECTED]
> with "unsubscribe freebsd-questions" in the body of the message

-- 

Henrik Hudson
[EMAIL PROTECTED]

Note:  Beware of Dragons - Thou art crunchy and taste good with ketchup.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message

Reply via email to