Hello!

I've been trying to start qmail using a hacked version of the 
/etc/init.d/httpd script but the script - /etc/init.d/smtp - just hangs 
after echo'ing the message "Starting qmail: ". (`csh -cf '/var/qmail/rc'` 
works correctly.) I'm not familiar with shell scripting - could the error be 
caused because /var/qmail/rc doesn't return a value to `RETVAL=$?` ? 
(/etc/init.d/smtp stop works just great!)

Thanks in advance!
Eric P.
Los Gatos, CA

/etc/init.d/smtp:
================
#!/bin/sh
#
# Startup script for the qmail mail transfer agent (MTA)
#
# description: The qmail package manages all e-mail messages
#              the come into or leave this server.
# processes/daemons: /var/qmail/qmail-send
#                    /var/qmail/splogger
#                    /var/qmail/qmail-lspawn
#                    /var/qmail/qmail-rspawn
#                    /var/qmail/qmail-clean
# config files: /var/qmail

# Source function library.
. /etc/rc.d/init.d/functions

# Path to the qmail boot script.
qmail=/var/qmail/rc
RETVAL=0

# Until glibc's locale support is working right again, work around it.
LANG=C

# Change the major functions into functions.
start() {
        echo -n "Starting qmail: "
        daemon ${qmail}
        RETVAL=$?
        echo
        [ $RETVAL = 0 ] && touch /var/lock/subsys/smtp
        return $RETVAL
}
stop() {
        echo -n "Shutting down qmail: "
        killproc qmail-send
        RETVAL=$?
        echo
        [ $RETVAL = 0 ] && rm -f /var/lock/subsys/smtp
        return $RETVAL
}

# See how we were called.
case "$1" in
  start)
        start
        ;;
  stop)
        stop
        ;;
  restart)
        stop
        start
        ;;
*)
        echo "Usage: $0 {start|stop|restart}"
        exit 1
esac

exit $RETVAL

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

Reply via email to