On Tue, May 17, 2005 at 10:30:55AM +0700, -= Tran Vu Hung =- wrote:
> 
> em ddi.nh la`m the^' na`y kho^ng bie^'t ca'c ba'c tha^'y sao
> 
> ~/.bash_profile
>       #       Start Fetchmail up when I Login.
>       TDEV=`tty | sed -n -e "s#/dev/##p"`
> 
>       if [ ! -s ~/.fetchmail.pid ]; then
>               echo -n "Starting fetchmail daemon..."
>               fetchmail -d 900 // 15 phut
>               echo $TDEV > ~/.fetchmail.owner
>               echo "done."
>       fi
>       # END of Fetchmail startup
> 
> ~/.bash_logout
>       #       Below is for Fetchmail clean up
>               TDEV=`tty | sed -n -e "s#/dev/##p"`
>       
>       if [ -s ~/.fetchmail.pid ]; then
>               if [ -s ~/.fetchmail.owner ]; then
>                       OWNER=`cat ~/.fetchmail.owner`
> 
>                       if [ $TDEV = $OWNER ]; then
>                               rm -rf ~/.fetchmail.owner
>                               fetchmail -q >/dev/null 2>&1
>                       fi
>               fi
>       fi
>       # END of Fetchmail clean up
> 
> 
> hoac cach nay, ca'c ba'c xem giu'p em chu't co`n thie^'u xo't cho^~ na`o 
> kho^ng a.
> ca'i nay em co' tham kha?o 
> 
> ----- Begin fetchmail.sh -----
> #! /bin/bash
> LOGCOUNT=w -hsf|grep hung|wc -l
> MAXCOUNT=1
> 
> case "$1" in
>  start-daemon)
>    if [ -e ~hung/.fetchmail.pid ]
>      then
>      exit
>    fi
>    fetchmail -d 900 // khoang 15 phut no chay 1 lan
>    ;;
> 
>  start)
>    if [ -e ~hung/.fetchmail.pid ]
>      then
>      exit
>    fi
>    fetchmail
>    ;;
> 
>  stop-daemon)
>    if [ ! -e ~hung/.fetchmail.pid ]
>      then
>      exit
>    fi
>    if [ $LOGCOUNT -eq $MAXCOUNT ]
>      then
>      fetchmail --quit
>    fi
>    ;;
> 
> esac
> exit 0
> 
> 

Ve co ban, bac dat 'set daemon 900' vao ~/.fetchmailrc la` du?. Ngoai
ra toi thay config fetchmail bang fetchmailconf la` tru+.c quan
nha^'t.


-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
_______________________________________________
VietLUG-users mailing list
VietLUG-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vietlug-users

Trả lời cho