OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
From: Baron Fujimoto (baron_at_lava.net)
Date: Tue Nov 26 2002 - 23:32:58 CST

  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

    We use a few shell scripts invoked from a crontab to distribute our
    configs to a set of servers. I thought it might be a good idea to run a
    "postfix check" within the scripts at the end of the process so it would
    readily apparent if we had distributed a change which broke things. E.g.

      postfix/postfix-script: warning: not owned by root: /etc/postfix

    However it seems that, aside from the logfile, the check option only
    writes warnings and errors to a tty type of device, so contructs like 2>&1
    don't work if the command is invoked from within a sh script. Does anyone
    have any ideas how to duplicate this output on stdout when "postfix check"
    is not run from tty? Or is there some other approach I should try to
    achieve the desired effect?