From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/1109 Path: news.gmane.org!not-for-mail From: Jack Cummings Newsgroups: gmane.comp.sysutils.supervision.general Subject: Re: run script for postfix.. Date: Sat, 6 May 2006 10:33:41 -0700 Message-ID: <20060506173341.GJ8859@ice.mudshark.org> References: <20060505231724.GH8859@ice.mudshark.org> Reply-To: jack@mudshark.org NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="+mQKy/8VjtYrTtD4" X-Trace: sea.gmane.org 1146936827 6179 80.91.229.2 (6 May 2006 17:33:47 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 6 May 2006 17:33:47 +0000 (UTC) Cc: supervision@list.skarnet.org Original-X-From: supervision-return-1345-gcsg-supervision=m.gmane.org@list.skarnet.org Sat May 06 19:33:45 2006 Return-path: Envelope-to: gcsg-supervision@gmane.org Original-Received: from antah.skarnet.org ([212.85.147.14]) by ciao.gmane.org with smtp (Exim 4.43) id 1FcQf2-0003dO-Iw for gcsg-supervision@gmane.org; Sat, 06 May 2006 19:33:44 +0200 Original-Received: (qmail 3942 invoked by uid 76); 6 May 2006 17:34:05 -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 3936 invoked from network); 6 May 2006 17:34:05 -0000 Original-To: Charlie Brady Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i Xref: news.gmane.org gmane.comp.sysutils.supervision.general:1109 Archived-At: --+mQKy/8VjtYrTtD4 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, May 05, 2006 at 08:54:34PM -0400, Charlie Brady wrote: =20 > Those bits are likely unwise. Throwing away error output is always a=20 > bad idea. Agreed. Here's a better version: ---=20 #!/bin/sh -e export PATH=3D$(postconf -h command_directory):$(postconf -h daemon_directo= ry):${PATH} master -t || postfix stop=20 postfix check=20 exec master=20 # Notes: # # - use ksh for versions of sh that don't support $() # # - master does a setsid(). This will fail if it already is a process lead= er ; # if it is run from a shell=20 # # - postfix is not intended to run from daemotools, and as such "postfix s= top" # no longer works as intended by the author.=20 ---=20 -- 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 G= ood Band --+mQKy/8VjtYrTtD4 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (GNU/Linux) iD8DBQFEXN31Hdj4sMzw+u4RAmBvAJwPvJS/YR8BfGFyHu6FrPd7cZDVhgCePCpF C+L2C431LeZcSwuHzz9lYD4= =o/rz -----END PGP SIGNATURE----- --+mQKy/8VjtYrTtD4--