summaryrefslogtreecommitdiff
path: root/scripts/proxsmtpd.sh
blob: fcc34931ef428476ecbc0414fd349034eae3ccf4 (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 proxsmtpd.conf file.
# For more info see:
#   man proxsmtpd.conf

# The prefix proxsmtpd was installed to
prefix=/usr/local/

# The location for pid file
piddir=/var/run/

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

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