Graham Leggett <[email protected]> writes: > Dan Poirier wrote: > >>> Redhat's init scripts don't work anything like the apachectl script, and >>> trying to call one from the other causes the exact problem you mention - >>> loss of environment variables, and all round weirdness. >> >> Maybe I'm just slow getting back up to speed after the holiday, but I'm >> not seeing how it would cause a problem. Could you please expand on >> that? > > On a Redhat machine (Fedora/RHEL/Centos), search > /etc/rc.d/init.d/functions for functions called "daemon", "status" and > "killproc". These functions provide similar but incompatible > functionality to that provided by apachectl, and only exist on Redhat > derived machines.
Well, apachectl doesn't provide any of that functionality. About all it does is source bin/envvars, if it exists, and then call httpd and pass along any command line arguments. httpd does all the start/stop/restart etc. logic internally. So I'm still not seeing the problem with setting httpd=apachectl in httpd.init, which would make bin/envvars apply, and not really change the behavior otherwise. > The startup script is far too trivial to justify jumping through hoops > to try and make apachectl work like Redhat's init. That's not what I was suggesting, and I don't think it would be necessary. > It's caused us enough grief already, thus the fix. What grief is that? I don't actually know what problem we're trying to fix here. Dan
