On Sun, 26 May 2013 23:03:17 +0100 nev young nev@nevilley.org.uk allegedly wrote:
On 26/05/13 20:09, mick wrote:
So what I have in mind is some mechanism that I can invoke to prevent new connections being established but permit the existing ones to complete before I switch off. I've thought about cobbling together an iptables script which will change the lines:
| I thought that ||"||apachectl -k graceful-stop|" would do this |but I've never tried it.
Nev
Nev
Many thanks for this. In my case this won't work. I should have said that I use lighttpd, not apache. But your answer pointed me in the right direction anyway. Searches on "lighttpd apachectl" and "lighttpd run-time control" and (eventually) "lighttpd graceful shutdown" gave me the answer. It turns out that lighty >= 1.4.3 will stop accepting new connections but continue to service existing ones if sent a SIGINT.
So a simple script is all I need. Thanks again.
Cheers
Mick
---------------------------------------------------------------------
blog: baldric.net gpg fingerprint: FC23 3338 F664 5E66 876B 72C0 0A1F E60B 5BAD D312
---------------------------------------------------------------------