#!/bin/sh
###########################################################################
# CONFIGURATION
# Most configuration options are found in the clamsmtpd.conf file.
# For more info see:
# man clamsmtpd.conf
# The prefix clamsmtpd was installed to
prefix=/usr/local
# The location for pid file
piddir=/var/run/clamsmtpd
###########################################################################
# SCRIPT
case $1 in
start)
mkdir -p $piddir
$prefix/sbin/clamsmtpd -d 3 -p $piddir/clamsmtpd.pid &
echo START "clamsmtpd "
;;
stop)
[ -f $piddir/clamsmtpd.pid ] && kill `cat $piddir/clamsmtpd.pid`
echo STOP "clamsmtpd "
;;
*)
echo "usage: clamsmptd.sh {start¦stop}" >&2
;;
esac
|