Lines 16-22
Link Here
|
16 |
CONF_DIR="${CONF_DIR}.${CONF_OPT}" |
16 |
CONF_DIR="${CONF_DIR}.${CONF_OPT}" |
17 |
fi |
17 |
fi |
18 |
|
18 |
|
19 |
opts="${opts} reload" |
19 |
opts="${opts} reload abort flush" |
|
|
20 |
|
21 |
description_reload="Re-read configuration files. Running processes terminate at their earliest convenience." |
22 |
description_abort="Stop the Postfix mail system abruptly. Running processes are signaled to stop immediately." |
23 |
description_flush="Force delivery: attempt to deliver every message in the deferred mail queue." |
20 |
|
24 |
|
21 |
depend() { |
25 |
depend() { |
22 |
use logger dns ypbind amavisd mysql postgresql antivirus postfix_greylist net saslauthd |
26 |
use logger dns ypbind amavisd mysql postgresql antivirus postfix_greylist net saslauthd |
Lines 37-44
Link Here
|
37 |
|
41 |
|
38 |
stop() { |
42 |
stop() { |
39 |
ebegin "Stopping postfix (${CONF_DIR})" |
43 |
ebegin "Stopping postfix (${CONF_DIR})" |
40 |
/usr/sbin/postfix -c ${CONF_DIR} stop >/dev/null 2>&1 |
44 |
/usr/sbin/postfix -c ${CONF_DIR} status > /dev/null 2>&1 |
41 |
eend $? |
45 |
if [[ $? -eq 0 ]]; then |
|
|
46 |
/usr/sbin/postfix -c ${CONF_DIR} stop >/dev/null 2>&1 |
47 |
eend $? |
48 |
else |
49 |
eerror "Postfix not running (${CONF_DIR})" |
50 |
eend 0 |
51 |
fi |
42 |
} |
52 |
} |
43 |
|
53 |
|
44 |
reload() { |
54 |
reload() { |
Lines 46-48
Link Here
|
46 |
/usr/sbin/postfix -c ${CONF_DIR} reload >/dev/null 2>&1 |
56 |
/usr/sbin/postfix -c ${CONF_DIR} reload >/dev/null 2>&1 |
47 |
eend $? |
57 |
eend $? |
48 |
} |
58 |
} |
|
|
59 |
|
60 |
abort() { |
61 |
ebegin "Aborting postfix (${CONF_DIR})" |
62 |
|
63 |
# zap! |
64 |
if service_started "${SVCNAME}"; then |
65 |
mark_service_stopped "${SVCNAME}" |
66 |
fi |
67 |
|
68 |
/usr/sbin/postfix -c ${CONF_DIR} abort |
69 |
eend $? |
70 |
} |
71 |
|
72 |
flush() { |
73 |
ebegin "Flushing postfix mail queue (${CONF_DIR})" |
74 |
/usr/sbin/postfix -c ${CONF_DIR} flush > /dev/null 2>&1 |
75 |
eend $? |
76 |
} |