-
Notifications
You must be signed in to change notification settings - Fork 1
/
init.d-script
38 lines (34 loc) · 1021 Bytes
/
init.d-script
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
33
34
35
36
37
38
#
# qmail /etc/init.d script for qmail (http://www.qmail.org/)
#
# Version: @(#) /etc/init.d/qmail 1.00 03-Sep-1997
#
# Author: Larry Doolittle <[email protected]>
# derived from skeleton by Miquel van Smoorenburg,
#
# Source function library.
. /etc/rc.d/init.d/functions
# See how we were called.
case "$1" in
start)
touch /var/lock/subsys/qmail
env - PATH="/var/qmail/bin:$PATH" \
csh -cf 'qmail-start ./Mailbox splogger qmail &'
# should limit RLIMIT_AS here, but bash apparently doesn't
# know that exists. For now it is hacked into qmail-smtpd.
# 0.5M data should be plenty, resists DOS attacks
tcpserver -u 1911 -g 2081 0 smtp /var/qmail/bin/qmail-smtpd &
echo $! >/var/lock/subsys/qmail-smtpd
;;
stop)
killall qmail-send
kill `cat /var/lock/subsys/qmail-smtpd`
rm -f /var/lock/subsys/qmail-smtpd
rm -f /var/lock/subsys/qmail
;;
*)
echo "Usage: qmail {start|stop}"
exit 1
esac
exit 0