On Sunday 03 December 2000 07:50, you wrote:
> > I have kppp configured execute a startup script upon connection,
> this script first registers a name with dydns.org, then restarts my
> webserver (there is a sudo /etc/rc.d/init.d/httpd restart' in the
> script to do this, and yes, the user executing the scripd has the
> correct entry in the sudoers file). This has been working great with
> 7.1. After upgrading to 7.2 I have noticed the following happening
>
> Sometimes the webserver does not restart, sometimes it does.
>
> If i run the httpd script manually, to see the error messages, I see
> the following
> [warn] NameVirtualHost cowdog.dyndns.org:80 has no VirtualHosts
>
> This would lead me to believe that there is something wrong with my
> httpd.conf file, but if I do the following
> linuxconf
> control tab
> control panel button
> activate configuration button
> do it button
>
> I get the same error message in the httpd/error_log, but the webserver
> actually does start up and works correctly every time....
>
> So can anyone tell me what is different between the way that linuxconf
> starts a service, and the rc.d/init.d/httpd script starts?
It seems that httpd-perl was always being started, but the start of httpd
would always fail. It did not matter whether it was started as a user
(via sudo) or directly as root, but the "/etc/rc.d/init.d/httpd restart'"
command always fails. I think it has to do with the wait constructs in
the script.
Poking about on the apache website led me to this solution
#!/bin/sh
if [ -e /var/run/httpd-perl.pid ]; then
echo "Restarting httpd-perl pid=" `cat /var/run/httpd-perl.pid`
kill -USR1 `cat /var/run/httpd-perl.pid`
fi
if [ -e /var/run/httpd.pid ]; then
echo "Restarting httpd pid=" `cat /var/run/httpd.pid`
kill -USR1 `cat /var/run/httpd.pid`
fi
which seems to do the trick
Oddly enough, both linuxconf & webmin were able to restart the server
without any problems, just executing the start script from another script
or from the console or xterm has a problem.
--
Alex
(Go easy on me, I'm a COBOL programmer in real life)
Keep in touch with http://mandrakeforum.com:
Subscribe the "[EMAIL PROTECTED]" mailing list.