Bob Langford said the following on 16/09/2004 02:38:
> Here's the issue: it seems to me that this startup script should
> call apachectl to do the real work, instead of reimplementing it.
Why? apachectl is just a wrapper. You could say that it's the other way
around (apachectl reimplementing the apache start/stop script).
> But I've searched for and found many examples of apache startup
> files, and NONE of them do that -- they all ignore apachectl.
The only daemon that does that (which I know off) is sendmail (at least
on a Debian system), but, ofcourse, sendmail is not Apache.
> I've learned over the years that this situation will eventually
> lead to some hard-to-find problem. If the system starts automatically
Can you give an example? I've administered a few Apache boxes on
different platforms and have never encountered a problem with this.
> one way, and manually another way, it's harder to be SURE that
> they are the same.
I see what you mean and theoretically you're right. Still, I've not had
problems with it.
> So, why don't people use apachectl in their system startup scripts?
There are differences in start/stop scripts and wrapper scripts, where
the latter usually has more options. The start/stop scripts are usually
run by /etc/init.d/rc (or something like that), which is controlled by
init, whereas a wrapper script is more a "user" (instead of "daemon") thing.
For Apache the difference might be very little, but there are a few
start/stop scripts which have to run when /usr (and thereby /usr/bin and
/usr/sbin) are not yet mounted (or already u(n)mounted in case of going
down).
You might want to symlink the start/stop script to apachectl as Davide
pointed out (not that he really suggested it), but that may raise other
problems and I would recommend against it.
--
Regards
Harrie<!-- ~MESSAGE_AFTER~ -->
>> Stay informed about: need opinions about startup script