From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/491 Path: main.gmane.org!not-for-mail From: Lloyd Zusman Newsgroups: gmane.comp.sysutils.supervision.general Subject: Re: Who actually gets the TERM signal in "runsvctrl down"? Date: Fri, 25 Jun 2004 22:44:12 -0400 Sender: news Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1088218010 5762 80.91.224.253 (26 Jun 2004 02:46:50 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 26 Jun 2004 02:46:50 +0000 (UTC) Cc: Charlie Brady Original-X-From: supervision-return-729-gcsg-supervision=m.gmane.org@list.skarnet.org Sat Jun 26 04:46:40 2004 Return-path: Original-Received: from antah.skarnet.org ([212.85.147.14]) by deer.gmane.org with smtp (Exim 3.35 #1 (Debian)) id 1Be3DE-0003Fq-00 for ; Sat, 26 Jun 2004 04:46:40 +0200 Original-Received: (qmail 18215 invoked by uid 76); 26 Jun 2004 02:47:01 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Archive: Original-Received: (qmail 18209 invoked from network); 26 Jun 2004 02:47:01 -0000 X-Injected-Via-Gmane: http://gmane.org/ Original-To: supervision@list.skarnet.org Original-Lines: 33 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: hippo.asfast.com User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.2 (gnu/linux) Cancel-Lock: sha1:xTLX/NjhKEO6KUcHDz9uEhvJ8Tg= Xref: main.gmane.org gmane.comp.sysutils.supervision.general:491 X-Report-Spam: http://spam.gmane.org/gmane.comp.sysutils.supervision.general:491 Charlie Brady writes: > On Fri, 25 Jun 2004, Lloyd Zusman wrote: > > [ ... ] > > Being started and being restarted are both covered by what is done in the > run script. If you need something special done when you stop a daemon > (which usually is not the case), then with runit you can provide a > "finish" script. But look more carefully at the script fragment I wrote in the previous message: I want to do something different between "restart" and "graceful" ... restart: before sending the signal to httpd, clean up some subdirectories under /tmp that are used in certain web apps on my site; and only _then_ send the signal to httpd (do this before "start", also, but that's a trivial case) graceful: just send the signal to httpd and _do_ _not_ clean up any directories, because in apache, a "graceful" restart keeps connections open, etc., and I don't want existing data to be lost How do I cause my /tmp directories to get cleaned up during "restart", but not during "graceful"? -- Lloyd Zusman ljz@asfast.com God bless you.