George Hong <[EMAIL PROTECTED]> writes:
> Hi there,
>   I have daemontool 0.61 installed for qmail on Redhat Linux 6.0.

Bruce Guenter has an rpm spec for daemontools-0.61 that I found helpful.

> Everything works fine except two problems related to svscan:
>   1. I have qmail, qmail-smtpd, qmail-pop3d directories under directory
> /var/lock/qmailsvc with run script in each directory. When I run svscan
> in /var/lock/qmailsvc, the processes will all be invoked and work. If I
> put it in the script, it will give the error message and fails:
>   Here is the script:
> #! /bin/sh
> 
> # Source function library.
> . /etc/rc.d/init.d/functions
> 
> QPATH=/var/lock/qmailsvc
> 
> case "$1" in
>   start)
>         cd $QPATH
>         /usr/local/bin/svscan &
>         ;;
>   stop)
>         pid=`pidofproc svscan`
>         kill $pid
>         sleep 2
>         cd $QPATH
>         /usr/local/bin/svc -dx *
>         ;;
>    *)
>         echo "usage: $0 start|stop"
>     ;;
> esac
>   The error message is:
> svscan: warning: unable to start supervise qmail: file does not
> exist

Do you have an old version of daemontools still installed?  Maybe the
script is picking up a different version from that found in your
shell's PATH.  Something similar happened to me when bash remembered
/usr/local/bin/svc (old version) even though I had installed
/usr/bin/svc (new version).  'hash -r' fixed that.  I think the error
message was the same as yours.

> svscan: warning: unable to start supervise qmail-smtpd: file does not
> exist
> svscan: warning: unable to start supervise qmail-pop3d: file does not
> exist
> 
>   2. The second question is that it doesn't write to the log file, all
> the message will be displayed at the console window.
>   Take qmail as example:
>   Here is the directory structure:
> [root@roadrunner qmail]# pwd
> /var/lock/qmailsvc/qmail
> [root@roadrunner qmail]# ls -la */*
> -rwxrwxr-x   1 qmaill   nofiles        74 Sep 24 16:17 log/run

You need to chmod +t log

> prw-------   1 qmaill   nofiles         0 Oct  6 17:03 supervise/control
> 
> -rw-------   1 qmaill   nofiles         0 Sep 24 16:19 supervise/lock
> prw-------   1 qmaill   nofiles         0 Sep 24 16:19 supervise/ok
> -rw-r--r--   1 root     root           18 Oct  6 17:05 supervise/status
> 
> log/supervise:
> total 3
> drwx------   2 qmaill   nofiles      1024 Sep 24 16:19 .
> drwxrwxr-x   3 qmaill   nofiles      1024 Sep 24 17:34 ..
> prw-------   1 qmaill   nofiles         0 Sep 24 16:11 control
> -rw-------   1 qmaill   nofiles         0 Sep 24 16:11 lock
> prw-------   1 qmaill   nofiles         0 Sep 24 16:11 ok
> -rw-r--r--   1 qmaill   nofiles        18 Sep 24 16:19 status
> 
> [root@roadrunner qmail]# more run
> #! /bin/sh
> exec qmail-start "|dot-forward .forward
> ./Maildir/" tai64n qmail

You don't need to explicitly invoke tai64n.  Just put 't' on the
multilog command line in log/run.

> [root@roadrunner qmail]# more log/run
> #! /bin/sh
> exec setuidgid qmaill multilog -s 1000000 -n 10 /var/log/qmail
> 
> Can anyone give me a hint where I might have done wrong?

-- 
Frank Cringle,      [EMAIL PROTECTED]
voice: (+49 2304) 467101; fax: 943357

Reply via email to