processes {Scanned by HJMS}

Willem Kuiters wkuiters at FREE.FR
Thu Sep 18 15:11:00 IST 2003


On Thu, Sep 18, 2003 at 08:26:29AM +0100, Julian Field wrote:
> What happens when MailScanner is running and you do a "check_mailscanner"?
> You might need to tweak that script a bit if it says "Starting MailScanner".

It did say "Starting MailScanner". As this possibly concerns other users
of the debian package, I publish my check_mailscanner "tweak" on this
list.

Original script: (/usr/sbin/check_mailscanner)

......

# Check that the virus scanner is still running.
# Re-start it if necessary.
# This can also be used from the init script to start it in the first
# place.

process=MailScanner
bindir=/usr/sbin
libdir=/usr/share/MailScanner
config=/etc/MailScanner/MailScanner.conf

pid=`/bin/ps axww |
_________________________________________
     /bin/grep '[ ]'$bindir/$process |
-----------------------------------------
     /usr/bin/awk '{ print $1 }'`
if [ "$pid" = "" ]; then
  # Quietly try to set the open_files limit
  ulimit -n 2000 >/dev/null 2>&1
  # Restart it
  PATH=${bindir}:$PATH
  echo Starting MailScanner...
  cd $libdir
  $process $config
else
  echo MailScanner running with pid $pid
fi


"Tweak"
..........

process=MailScanner
bindir=/usr/sbin
libdir=/usr/share/MailScanner
config=/etc/MailScanner/MailScanner.conf

pid=`/bin/ps axww |
_____________________________________
     /bin/grep $process |
-------------------------------------
/usr/bin/awk '{ print $1 }'`
if [ "$pid" = "" ]; then
  # Quietly try to set the open_files limit
  ulimit -n 2000 >/dev/null 2>&1
  # Restart it
  PATH=${bindir}:$PATH
  echo Starting MailScanner...
  cd $libdir
  $process $config
else
  echo MailScanner running with pid $pid
fi


I hope this may help other (debian?) users,

Willem



More information about the MailScanner mailing list