Amaya dijo:
> Para estable, habría que usar el /etc/init.d/fetchmail que adjunto por
> se pequeñito :-)

En fin... ahora sí :-)

#!/bin/sh
#
export HOME=/root
FETCHMAIL="/usr/bin/fetchmail"
#test -x "$FETCHMAIL" || exit 0

case "$1" in
  start)
        echo -n "Starting fetchmail daemon: fetchmail"
        #sleep 160
        "$FETCHMAIL" -d 60 -L /dev/tty12 -f /root/.fetchmailrc
        # Otras opciones:
        #-d60 --syslog -f /root/.fetchmailrc 
        echo "."
        ;;
  stop)
        echo -n "Stopping fetchmail daemon: fetchmail"
        killall "$FETCHMAIL"
        echo "."
        ;;
  restart)
        echo -n "Restarting fetchmail daemon: fetchmail"
        #NUM_FETCHMAIL=`ps aux | grep "$FETCHMAIL" | grep -v grep|wc -l`
        #if [ "$NUM_FETCHMAIL" = "0" ] ;then
        #       $0 stop
        #       $0 start
        #else
        #       "$FETCHMAIL"
        #fi
        $0 stop
        $0 start
        echo "."
        ;;
  reload)
        echo "We can only reload with a restart"
        $0 restart
        echo "."
        ;;
  force-reload)
        $0 restart
        ;;
  *)
        echo "Usage: $0 {start|stop|restart|reload|force-reload}"
        exit 1
        ;;
esac

exit 0

-- 
Open your mind, and your ass will follow    - Michael Balzary, aka Flea, RHCP

 Amaya Rodrigo Sastre       www.andago.com  Sta Engracia, 54  28010 Madrid
 BOFH-dev && CVS Evangelist                 Tfn: 912041124    Fax: 912041111

Responder a