#!/bin/bash

# (c) 2016 Heinlein Support GmbH
#          Robert Sander <r.sander@heinlein-support.de>

# This is free software;  you can redistribute it and/or modify it
# under the  terms of the  GNU General Public License  as published by
# the Free Software Foundation in version 2.  This file is distributed
# in the hope that it will be useful, but WITHOUT ANY WARRANTY;  with-
# out even the implied warranty of  MERCHANTABILITY  or  FITNESS FOR A
# PARTICULAR PURPOSE. See the  GNU General Public License for more de-
# ails.  You should have  received  a copy of the  GNU  General Public
# License along with GNU Make; see the file  COPYING.  If  not,  write
# to the Free Software Foundation, Inc., 51 Franklin St,  Fifth Floor,
# Boston, MA 02110-1301 USA.

if [ -x /usr/sbin/amavisd-agent ]; then
  echo '<<<amavis>>>'
  echo '[ps]'
  /bin/ps ax | /bin/grep '[a]mavisd'
  echo '[agent]'
  waitmax 5 /usr/sbin/amavisd-agent -c 1 | grep -v ^$
fi
