|
From: Mark M. <Mar...@ij...> - 2010-03-18 18:21:47
|
On Thursday 18 March 2010 18:19:43 Jo Rhett wrote: > So I've been putting up with this for a few years, and just recently sat > down and tried to figure this out. I've now tried every possible way of > redirecting from the shell, and no matter what I always get the following > output to stderr. > > # /usr/local/sbin/amavisd reload 2>&1 1>/dev/null > Daemon [14925] terminated by SIGTERM, waiting for dust to settle... > becoming a new daemon... > > I haven't dug into the code, but it's clear that amavisd is resetting > stderr and writing directly to it. Why? > > And in particular, it would be nice to have a "--quiet" or another option > to just have it return a result code as to whether or not the > reload/restart was successful. For use in sa-update scripts, obviously > ;-) This should do: amavisd reload >/dev/null 2>&1 Mark |