Newsgroup: it.comp.os.linux.sys
Titolo: Problema nel riavvio Qmail + Daemontools

Ciao,
mi sapete indicate la procedura corretta per riavviare qmail+daemontools..
Non intendo i riavii tramite svc ..
mi capita di rado di dover riavviare tutto il blocco ..
empiricamente faccio cosï¿œ:
#!/bin/sh
/var/qmail/bin/qmailctl stop;
mv /service /service_backup;
killall -9 svscan;
killall -9 qmail-rspawn;
killall -9 qmail-rspawn;
killall -9 qmail-send;
killall -9 qmail-remote;
killall -9 svscanboot;
killall -9 tcpserver;
killall -9 qmail-todo;
killall -9 qmail-smtpd;
killall -9 supervise;
killall -9 qmail-rspawn;
killall -9 qmail-rspawn;
killall -9 qmail-send;
killall -9 qmail-remote;
killall -9 svscanboot;
killall -9 tcpserver;
killall -9 qmail-todo;
killall -9 qmail-smtpd;
killall -9 qmail-send;
killall -9 qmail-pop3;
killall -9 supervise;
sleep 1
mv /service_backup /service;
/command/svscanboot &
/var/qmail/bin/qmail-tcpok
Ma succede una cosa molto strana ..
per un po tutto OK, dopo 4/5 minuti, mi salta fuori:
22474 ?        S      0:00 /bin/sh /command/svscanboot
22477 ?        S      0:00  \_ svscan /service
23332 ?        Z      0:00  |   \_ [supervise] <defunct>
23333 ?        Z      0:00  |   \_ [supervise] <defunct>
23334 ?        Z      0:00  |   \_ [supervise] <defunct>
23335 ?        Z      0:00  |   \_ [supervise] <defunct>
23336 ?        Z      0:00  |   \_ [supervise] <defunct>
23337 ?        Z      0:00  |   \_ [supervise] <defunct>
22478 ?        S      0:00  \_ readproctitle service errors: ...y 
failure?supervise: fatal: unable to acquire log/supervise/lock: te
22877 ?        Ss     0:00 /bin/sh /command/svscanboot
22879 ?        S      0:00  \_ svscan /service
22885 ?        S      0:00  |   \_ supervise qmail-smtpd
22894 ?        S      0:00  |   |   \_ tcpserver -vR -l smtp2.xxx.cxm -c 
300 -u 530 -g 529 -x /etc/tcp.smtp.cdb 0 25 /usr/local/bin/
23384 ?        S      0:00  |   |       \_ qmail-smtpd smtp2.xxx.cxm 
/home/vpopmail/bin/vchkpw /bin/true
22886 ?        S      0:00  |   \_ supervise log
22895 ?        S      0:00  |   |   \_ multilog t s100000000 n60 
/var/log/qmail/qmail-smtpd
22887 ?        S      0:00  |   \_ supervise qmail-updater
22891 ?        S      0:00  |   |   \_ /usr/bin/perl -w 
/service/qmail-updater/pipe-watcher
22888 ?        S      0:00  |   \_ supervise log
22896 ?        S      0:00  |   |   \_ multilog t n1024 s1048576 ./main 
-* +*ver: status:* =lstatus
22889 ?        S      0:00  |   \_ supervise qmail-send
22892 ?        S      0:00  |   |   \_ qmail-send
22906 ?        S      0:00  |   |       \_ qmail-lspawn ./Maildir
22907 ?        S      0:00  |   |       \_ qmail-rspawn
22908 ?        S      0:00  |   |       \_ qmail-clean
22909 ?        S      0:00  |   |       \_ qmail-todo
22910 ?        S      0:00  |   |       \_ qmail-clean
22890 ?        S      0:00  |   \_ supervise log
22893 ?        S      0:00  |       \_ multilog t s100000000 n60 
/var/log/qmail/qmail-send
22880 ?        S      0:00  \_ readproctitle service errors: 
.......................................................................
Come se mi duplicasse:
/bin/sh /command/svscanboot
Illuminatemi pls!
-- Yena --
Ps. lo so bisognerebbe passare a Postfix .. :-)

Yena ha scritto:

Aggiungo:
/var/log/messages
init: Id "SV" respawning too fast: disabled for 5 minutes
-- Yena --

 -- Yena --
Tovato.. lo posto nel caso dovesse servire a qualcuno:
init q
-- Yena --

 init q
]zac[
# cat `which qmailctl`
#!/bin/sh
# For Red Hat chkconfig
# chkconfig: - 80 30
# description: the qmail MTA
PATH=/var/qmail/bin:/bin:/usr/bin:/usr/local/bin:/usr/local/sbin
export PATH
QMAILDUID=`id -u qmaild`
NOFILESGID=`id -g qmaild`
case "$1" in
  start)
    echo "Starting qmail"
    if svok /service/qmail-send ; then
      svc -u /service/qmail-send
    else
      echo qmail-send supervise not running
    fi
    if svok /service/qmail-smtpd ; then
      svc -u /service/qmail-smtpd
    else
      echo qmail-smtpd supervise not running
    fi
    if [ -d /var/lock/subsys ]; then
      touch /var/lock/subsys/qmail
    fi
    if svok /service/qmail-pop3d ; then
      svc -u /service/qmail-pop3d
    else
      echo qmail-pop3d supervise not running
    fi
    ;;
  stop)
    echo "Stopping qmail..."
    echo "  qmail-smtpd"
    svc -d /service/qmail-smtpd
    echo "  qmail-send"
    svc -d /service/qmail-send
    if [ -f /var/lock/subsys/qmail ]; then
      rm /var/lock/subsys/qmail
    fi
    echo "  qmail-pop3d"
    svc -d /service/qmail-pop3d
    ;;
  stat)
    svstat /service/qmail-send
    svstat /service/qmail-send/log
    svstat /service/qmail-smtpd
    svstat /service/qmail-smtpd/log
    qmail-qstat
    svstat /service/qmail-pop3d
    svstat /service/qmail-pop3d/log
    ;;
  doqueue|alrm|flush)
    echo "Flushing timeout table and sending ALRM signal to qmail-send."
    /var/qmail/bin/qmail-tcpok
    svc -a /service/qmail-send
    ;;
  queue)
    qmail-qstat
    qmail-qread
    ;;
  reload|hup)
    echo "Sending HUP signal to qmail-send."
    svc -h /service/qmail-send
    ;;
  pause)
    echo "Pausing qmail-send"
    svc -p /service/qmail-send
    echo "Pausing qmail-smtpd"
    svc -p /service/qmail-smtpd
    echo "Pausing qmail-pop3d"
    svc -p /service/qmail-pop3d
    ;;
  cont)
    echo "Continuing qmail-send"
    svc -c /service/qmail-send
    echo "Continuing qmail-smtpd"
    svc -c /service/qmail-smtpd
    echo "Continuing qmail-pop3d"
    svc -c /service/qmail-pop3d
    ;;
  restart)
    echo "Restarting qmail:"
    echo "* Stopping qmail-smtpd."
    svc -d /service/qmail-smtpd
    echo "* Sending qmail-send SIGTERM and restarting."
    svc -t /service/qmail-send
    echo "* Restarting qmail-smtpd."
    svc -u /service/qmail-smtpd
    echo "* Restarting qmail-pop3d."
    svc -t /service/qmail-pop3d
    ;;
  cdb)
    tcprules /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp < /etc/tcp.smtp
    chmod 644 /etc/tcp.smtp.cdb
    echo "Reloaded /etc/tcp.smtp."
    ;;
  help)
    cat <<HELP
   stop -- stops mail service (smtp connections refused, nothing goes out)
  start -- starts mail service (smtp connection accepted, mail can go out)
  pause -- temporarily stops mail service (connections accepted, nothing
leaves)
   cont -- continues paused mail service
   stat -- displays status of mail service
    cdb -- rebuild the tcpserver cdb file for smtp
restart -- stops and restarts smtp, sends qmail-send a TERM & restarts it
doqueue -- schedules queued messages for immediate delivery
 reload -- sends qmail-send HUP, rereading locals and virtualdomains
  queue -- shows status of queue
   alrm -- same as doqueue
  flush -- same as doqueue
    hup -- same as reload
HELP
    ;;
  *)
    echo "Usage: $0 {start|stop|restart|doqueue|flush|reload|stat|pause
cont
cdb                                                                            
queue|help}"
    exit 1
    ;;
esac
exit 0