On Sun, Jul 25, 1999 at 12:47:05PM -0400, Alex Miller wrote:
[Quoted text which has been butchered beyond recognition by MS Outlook omitted]
> Having installed the memphis rpm the invocation of the tcpserver is
> controlled by the following file /etc/rc.d/init.d/qmail-qmtpd.init which is
> as follows:
>
> #! /bin/sh -
> # $INITDIR/qmail-qmqpd.init
> # INITDIR is defined below
> # Sun Dec 14 1997 XZ <[EMAIL PROTECTED]> v2.3
>
> # chkconfig: 345 84 49
> # description: Start, stop, restart, reload, and otherwise \
> # signal qmail-qmqpd. \
> # Makes heavy use of parts of DJB's daemontools package \
> # It also relies upon daemontools.functions for 91.04982% \
> # of the grunt work.
> #
> # [EMAIL PROTECTED]:
> # small fixes and modifications
>
> # customize
> QMAILHOME=/var/qmail # ~qmail
> USERID=`id -u qmaild` # UID to run with
> GROUPID=`id -g qmaild` # GID to run with
> PROG=qmail-qmqpd # what program?
> COMMAND=$PROG # command to start $PROG
> DIR=/var/lock/$PROG # directory for supervise
> LOGDIR=/var/log/$PROG # directory to log to
> LOGUSER=qmaill # user to own logs
> LOGSIZE="-s 1000000" # size of logfile
> CDB=/etc/tcprules.d/$PROG.cdb # rules file
> CONCURRENT=40 # number of concurrent connections
> # (40 is the default of tcpserver)
> PORT=628 # port to watch
> VERBOSE=-v # use verbose option to tcpserver
> INITDIR=/etc/rc.d/init.d # location of initscripts
>
> # Grab the daemontools init functions
> . $INITDIR/daemontools.functions
> export PATH=$QMAILHOME/bin:$PATH
>
> start() {
> if check; then
> echo "$PROG is already running"
> else
> echo -n "Starting $PROG..."
> if [ -e $CDB ]; then
> supervise $DIR \
> tcpserver $VERBOSE -c$CONCURRENT -x $CDB -u$USERID -g$GROUPID 0 $PORT
> $COMMAND \
> 2>&1| setuser $LOGUSER accustamp \
> | setuser $LOGUSER cyclog $LOGSIZE $LOGDIR &
> else
> supervise $DIR \
> tcpserver $VERBOSE -c$CONCURRENT -u$USERID -g$GROUPID 0 $PORT $COMMAND
> \
> 2>&1 | setuser $LOGUSER accustamp \
> | setuser $LOGUSER cyclog $LOGSIZE $LOGDIR &
> fi
> echo "done"
> fi
> }
>
> case "$1" in
> start)
> start
> ;;
> stop)
> stop
> ;;
> restart)
> restart
> ;;
> status)
> status
> ;;
> help)
> help
> ;;
> *)
> signal $1
> ;;
> esac
>
> I think I might be able to figure out how to fix this file so it doesn't
> launch a supervised tcpserver with incorrect parameters but it would be
> useful to start off with a working one, and then I can try to translate that
> into the script.
>
> What does your invocation look like?
Mine looks mostly like yours, except that mine doesn't have the extraneous -u.
> It seems to me though that since this script is unmodified from the memphis
> rpm that everyone who uses the memphis rpm should have the identical symptom,
> or am I missing something?
Hell if I can see where that -u is coming from, but if you see it in your
process list, it's coming from somewhere. It doesn't look like that script
should be producing it though; it looks like your -u wants to be a -v.
I've said it before: Redhat packages are wonderful things, but if you want to
understand how things work and not get caught by surprise by things like this,
install qmail and the related programs directly from the sources and write your
own scripts to start them up. Otherwise lots of stuff is going to remain
mysterious and will be much harder to troubleshoot.
Chris