supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
From: Jack Cummings <jack@mudshark.org>
Cc: supervision@list.skarnet.org
Subject: Re: run script for postfix..
Date: Sat, 6 May 2006 10:33:41 -0700	[thread overview]
Message-ID: <20060506173341.GJ8859@ice.mudshark.org> (raw)
In-Reply-To: <Pine.LNX.4.61.0605052053180.32571@e-smith.charlieb.ott.istop.com>

[-- Attachment #1: Type: text/plain, Size: 956 bytes --]

On Fri, May 05, 2006 at 08:54:34PM -0400, Charlie Brady wrote:
 
> Those bits are likely unwise. Throwing away error output is always a 
> bad idea.

Agreed. Here's a better version:

--- 
#!/bin/sh -e

export PATH=$(postconf -h command_directory):$(postconf -h daemon_directory):${PATH}

master -t || postfix stop 
postfix check 
exec master 

# Notes:
#
#  - use ksh for versions of sh that don't support $()
#
#  - master does a setsid(). This will fail if it already is a process leader ;
#  if it is run from a shell 
#
#  - postfix is not intended to run from daemotools, and as such "postfix stop"
#  no longer works as intended by the author. 
--- 

--
Jack (John) Cummings                           http://mudshark.org/
PGP fingerprint: 0774 D073 E386 B70B 6B16  2D2B 1DD8 F8B0 CCF0 FAEE
Now playing on Prime:    Egg -- Mr. Bungle
Now playing on Remedial: Life Beyond the Minimum Safe Distance -- Matthew Good Band

[-- Attachment #2: Type: application/pgp-signature, Size: 191 bytes --]

      reply	other threads:[~2006-05-06 17:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-05 23:17 Jack Cummings
2006-05-06  0:54 ` Charlie Brady
2006-05-06 17:33   ` Jack Cummings [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060506173341.GJ8859@ice.mudshark.org \
    --to=jack@mudshark.org \
    --cc=supervision@list.skarnet.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).