summaryrefslogtreecommitdiff
path: root/scripts/clamsmtpd.sh
blob: 51b47e433092e7e9d8c96ce9f11c1562576bbd4b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/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/clamav/

###########################################################################
# SCRIPT

case $1 in
start)
        mkdir -p $piddir
        $prefix/sbin/clamsmtpd -p $piddir/clamsmtpd.pid
        echo -n "clamsmtpd "
        ;;
stop)
        [ -f $piddir/clamsmtpd.pid ] && kill `cat $piddir/clamsmtpd.pid`
        echo -n "clamsmtpd "
        ;;
*)
        echo "usage: clamsmptd.sh {start|stop}" >&2
        ;;
esac