I have a problem auto starting qmail. I am using v1.03 and Daemontools v0.7 on Open Linux 2.3
 
I have created my svscan and qmail startup scripts (see below) in the init.d directory and set their permissions.
 
In the rcX.d directories, I have set up the link to svscan  (eg  ln –s ../init.d/svscan K12svscan )
 
Now, when I reboot, qmail doesn't start. If I go into the /etc/rc.d/init.d directory and type
 
    ./qmail start
    ./svscan start
 
it all runs perfectly. What am I doing wrong?
 
Thanks in advance.
 
Neil Whittington

=======================================
 
#!/bin/sh -e
# /etc/init.d/qmail : start or stop the qmail mail subsystem.
# borrowed from http://Web.InfoAve.Net/~dsill/lwq.html#start-qmail
# modified by Adam McKenna <[EMAIL PROTECTED]>
 
PATH=$PATH:/usr/local/bin:/var/qmail/bin
 
case "$1" in
    start)
        echo -n "Starting mail-transport-agent:"
        svc -u /var/qmail/supervise/*
        echo -n " qmail"
        svc -u /var/qmail/supervise/*/log
        echo " logging."
        ;;
    stop)
        echo -n "Stopping mail-transport-agent: "
        echo -n " qmail"
        svc -d /var/qmail/supervise/*
        echo " logging"
        svc -d /var/qmail/supervise/*/log
        ;;
    restart)
        $0 stop
        $0 start
        ;;
    reload|force-reload)
        echo "Reloading 'locals' and 'virtualdomains' control files."
        start-stop-daemon --stop --quiet --oknodo --signal HUP --exec /usr/sbin/qmail-send
        ;;
    *)
        echo 'Usage: /etc/init.d/qmail {start|stop|restart|reload}'
        exit 1
esac
 
exit 0
 

=======================================
 
#!/bin/sh -e
# /etc/init.d/svscan : start or stop svscan.
# borrowed from http://Web.InfoAve.Net/~dsill/lwq.html#start-qmail
# modified by Adam McKenna <[EMAIL PROTECTED]>
 
case "$1" in
    start)
        echo -n "Starting djb services: svscan "
        env - PATH="/usr/local/bin:$PATH" svscan /service &
        echo $! > /var/run/svscan.pid
        echo "."
        ;;
    stop)
        echo -n "Stopping djb services: svscan "
        kill `cat /var/run/svscan.pid`
        echo -n "services "
        svc -dx /service/*
        echo -n " logging "
        svc -dx /service/*/log
        echo "."
        ;;
    restart|reload|force-reload)
        $0 stop
        $0 start
        ;;
    *)
        echo 'Usage: /etc/init.d/svscan {start|stop|restart}'
        exit 1
esac
 
exit 0

 

Reply via email to