2 ######################################################################
3 # postfix: starts/stops postfix daemon
4 # description: Postfix is a Mail Transport Agent, which is the program
5 # that moves mail from one machine to another.
6 ######################################################################
8 daemon
="/usr/sbin/postfix"
11 ######################################################################
13 ######################################################################
14 [ -x $daemon ] || exit 1
16 ######################################################################
17 # Uncomment these if you want to rebuild aliases on restart
18 ######################################################################
19 #/usr/sbin/postalias hash:$config/aliases
20 #/usr/sbin/postmap hash:$config/{access,canonical,relocated,transport,virtual}
21 #/usr/sbin/postmap hash:$config/access.{client,helo,sender,recpnt}
23 ######################################################################
24 # Start/Stop/Reload/Status Functions
25 ######################################################################
28 dpid
=`pidof -o $$ -o $PPID -o %PPID -x ${base}`
29 if [ "$dpid" != "" ]; then
30 echo "${base} (pid $dpid) is running..."
31 elif [ -s /var
/run
/${base}.pid
]; then
32 echo "${base} is dead but pid file exists..."
34 echo "${base} is stopped."
38 ######################################################################
39 # See how we were called
40 ######################################################################
42 start
) $daemon start
;;
44 reload
) $daemon reload
;;
45 restart
) $daemon reload
;;
47 abort
) $daemon abort
;;
48 flush
) $daemon flush
;;
49 check
) $daemon check
;;
50 *) echo "Usage: $0 {start|stop|reload|restart|status|abort|flush|check}" ; exit 1 ;;