[Esd-l] Script file
ssykes at emirates.net.ae
Sun Jun 30 10:20:01 PDT 2002
This may not be the place to ask this but I thought as it is to do with
mail I might try. I have been attempting to get this script to work but
I haven't had much luck.
Al I am looking to do is have the link come up, fetchmail and send the
queue and drop the link. This script sees when the ppp0 is active but I
don't think it waits until the addresses have been sent to fetchmail
can't find the server. Is there a better way to loop until the link is
# login script
/usr/sbin/pppd /dev/ttyS0 57600 connect "/usr/sbin/chat -f
while [ ! -e /var/run/$DEVICE.pid ]; do
echo "Link is UP"
# When link is up, do mail
if [ -e /var/run/$DEVICE.pid ]; then
echo "PPP is UP, starting the mail transfer"
/usr/bin/fetchmail -v -f /home/mailbox/.fetchmailrc
echo "Done, Goodbye"
kill -INT `cat /var/run/$DEVICE.pid`
# get rid of a lock file if there.
if [ ! "$?" = "0" ]; then
rm -f /var/run/$DEVICE.pid
echo "ERROR: removed stale pid file"
# pppd closes.
echo "PPP link to $DEVICE terminated."
# The ppp process is not running for ppp0
echo "ERROR: PPP link is not active on $DEVICE"
More information about the esd-l