Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 09 Dec 1997 16:21:27 +0100
From:      Palle Girgensohn <girgen@partitur.se>
To:        "..je" <jehrenkrantz@whyy.org>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Where is apache Started?
Message-ID:  <348D61F7.552A6D29@partitur.se>
References:  <199712091425.JAA15615@whyy.org>

next in thread | previous in thread | raw e-mail | index | archive | help
..je wrote:
> 
> First. I submit for public humiliation freeley as the situation should never
> have occurred.
> 
> I recently Installed 2.2.5-Release.
> The files having been all downloaded and put on an ftp server on my net segment.
> I Installed a complete new system via ftp to that server.
> During the installed I asked that the apache server be installed.
> It was.
> A few weeks later I decided to make a few change to the servers environment.
>   I had no problem maing those changes but in the process I wanted to know
> where the httpd was started from. A serch of the process table shows that it
> starts after Sendmail and I though this would have given me enough insight,
> but search has ensued and I have to admit failure.
> I looked in rc,rc.conf,rc.local,rc.network,inetd but I can't find it. Would
> some kind soul please let me know where it would have been added in the
> startup. As I really have a problem not understanding what is going on.
> Thanks in Advance.
> Jeff
Hi Jeff!

Check rc.conf:

local_startup="/usr/local/etc/rc.d /usr/X11R6/etc/rc.d"    # startup
script dirs.


/etc/rc reads each file in theese dirs that ends with .sh:

# for each valid dir in $local_startup, search for init scripts matching
*.sh
if [ "X${local_startup}" != X"NO" ]; then
        echo -n 'Local package startup:'
        for dir in ${local_startup}; do
                [ -d ${dir} ] && for script in ${dir}/*.sh; do
                        [ -x ${script} ] && ${script} start
                done
        done
        echo .
fi



Magic revealed!    :-)
Also note the argument 'start' sent to the scripts. I guess the plan is
to add stop also, so that services can be stopped this way (and the
machine can more easily be brought down to single user mode). Today,
most scripts don't bother about the start argument.

Hope this helps!
/Palle



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?348D61F7.552A6D29>