3 # sendmail This shell script takes care of starting and stopping
6 # chkconfig: 2345 80 30
7 # description: Sendmail is a Mail Transport Agent, which is the program \
8 # that moves mail from one machine to another.
9 # processname: sendmail
10 # config: /etc/sendmail.cf
11 # pidfile: /var/run/sendmail.pid
13 # Source function library.
14 . /etc/rc.d/init.d/functions
16 # Source networking configuration.
17 . /etc/sysconfig/network
19 # Source sendmail configureation.
20 if [ -f /etc/sysconfig/sendmail ] ; then
21 . /etc/sysconfig/sendmail
27 # Check that networking is up.
28 [ ${NETWORKING} = "no" ] && exit 0
30 [ -f /usr/sbin/sendmail ] || exit 0
32 # See how we were called.
36 echo -n "Starting sendmail: "
37 daemon /usr/sbin/sendmail $([ "$DAEMON" = yes ] && echo -bd) \
38 $([ -n "$QUEUE" ] && echo -q$QUEUE)
40 touch /var/lock/subsys/sendmail
44 echo -n "Shutting down sendmail: "
47 rm -f /var/lock/subsys/sendmail
57 echo "Usage: sendmail {start|stop|restart|status}"