From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/1586 Path: news.gmane.org!not-for-mail From: Rehan Khan Newsgroups: gmane.comp.sysutils.supervision.general Subject: Customised control help Date: Tue, 1 Jan 2008 08:27:34 +0000 (UTC) Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1199176071 29665 80.91.229.12 (1 Jan 2008 08:27:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 1 Jan 2008 08:27:51 +0000 (UTC) To: supervision@list.skarnet.org Original-X-From: supervision-return-1821-gcsg-supervision=m.gmane.org@list.skarnet.org Tue Jan 01 09:28:06 2008 Return-path: Envelope-to: gcsg-supervision@gmane.org Original-Received: from antah.skarnet.org ([212.85.147.14]) by lo.gmane.org with smtp (Exim 4.50) id 1J9cTl-0001S1-CN for gcsg-supervision@gmane.org; Tue, 01 Jan 2008 09:28:05 +0100 Original-Received: (qmail 19801 invoked by uid 76); 1 Jan 2008 08:27:50 -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 19795 invoked from network); 1 Jan 2008 08:27:49 -0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 38 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: main.gmane.org User-Agent: Loom/3.14 (http://gmane.org/) X-Loom-IP: 81.86.133.231 (Mozilla/5.0 (compatible; Konqueror/3.5; Linux) KHTML/3.5.8 (like Gecko)) Original-Sender: news Xref: news.gmane.org gmane.comp.sysutils.supervision.general:1586 Archived-At: Hi >From the man page for runsv: Customize Control For each control character c sent to the control pipe, runsv first checks if service/control/c exists and is executable. If so, it starts service/control/c and waits for it to terminate, before interpreting the command. If the program exits with return code 0, runsv refrains from sending the service the corresponding signal. The command o is always considered as command u. On command d first service/control/t is checked, and then service/control/d. On command x first service/control/t is checked, and then service/control/x. The control of the optional log service cannot be customized. I have a couple of questions: 1) are all the control codes supported? Not just the ones in the above paragraph? (h, 1, 2, etc) 2) I have the t script for some of my services. Do I have to send a term manually after I have run the pre-term commands I need (i.e do I have to do everything a term signal should do?)? Right now the services don't stop properly and the status command reports 'run, want down' and the service stays up without exiting. 3) (Not directly related to the above.). I have a service called bluetooth which starts up the hcid process. The normal fedora init script runs some commands after the hcid daemon starts (using hciattach command). If the service starts successfully how can I run these post start commands within the runit method instead of in a separate script. I would like to keep everything a service does in the service directory. (I could background and disown another script with a sleep pre-pended but this is not a particularly clean implementation) 4) Is there a more detailed description of customised control somewhere? Thanks in advance R