From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/1391 Path: news.gmane.org!not-for-mail From: Gerrit Pape Newsgroups: gmane.comp.sysutils.supervision.general Subject: Re: check script Date: Tue, 13 Mar 2007 10:44:28 +0000 Message-ID: <20070313104428.8475.qmail@5f0221b5e9d16b.315fe32.mid.smarden.org> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1173782658 22210 80.91.229.12 (13 Mar 2007 10:44:18 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 13 Mar 2007 10:44:18 +0000 (UTC) To: supervision@list.skarnet.org Original-X-From: supervision-return-1628-gcsg-supervision=m.gmane.org@list.skarnet.org Tue Mar 13 11:44:09 2007 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 1HR4UC-0007zd-TF for gcsg-supervision@gmane.org; Tue, 13 Mar 2007 11:44:08 +0100 Original-Received: (qmail 734 invoked by uid 76); 13 Mar 2007 10:44:30 -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 725 invoked from network); 13 Mar 2007 10:44:30 -0000 Mail-Followup-To: supervision@list.skarnet.org Content-Disposition: inline In-Reply-To: Xref: news.gmane.org gmane.comp.sysutils.supervision.general:1391 Archived-At: On Mon, Mar 12, 2007 at 02:44:40PM +0000, Jorge Almeida wrote: > I ran socklog-conf and it created a file /etc/sv/socklog-unix/check that > looks like a run script: > #!/bin/sh > exec 2>/dev/null > exec socklog-check unix /dev/log > Can someone explain what is the purpose of /etc/sv/socklog-unix/check? See http://smarden.org/runit/sv.8.html It's run by 'sv start|restart|force-restart|check' and 'sv -v up' to check whether the service is up and functional, and not only the service daemon started. Here it checks whether a program is listening on /dev/log. The ./check script is optional, and good for service dependencies. For services that run service daemons that use syslog() to write log messages, 'sv start socklog-unix || exit' should be added to the run script, to make sure that no log messages are lost on bootup because the service daemon calls syslog() before the socklog-unix service actually is listening on /dev/log. HTH, Gerrit.