[svlug] Writing start-up scripts...
Eric Pretorious
epretorious at hotmail.com
Mon Mar 12 00:39:01 PST 2001
Hello!
I've been trying to start qmail using a hacked version of the
/etc/init.d/httpd script from Redhat 7 but the script - /etc/init.d/smtp -
just hangs after echo'ing the message "Starting qmail: ". (Executing the
start-up script directly, `csh -cf '/var/qmail/rc'`, works just fine,
though.) 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
/var/qmail/rc
=============
#!/bin/sh
exec env - PATH="/var/qmail/bin:$PATH" \
qmail-start ./Mailbox splogger qmail
/etc/init.d/smtp:
================
#!/bin/sh
#
# Startup script for the qmail mail transfer agent (MTA)
#
# 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
More information about the svlug
mailing list