On Tue, Aug 04, 1998 at 05:21:52PM -0700, Patrick Olson wrote: > > Unfortunately, the script I created (ppp-mail) calls ppp-on, waits until > ip-up creates a file (as a signal that the connection is up), does > "fetchmail &", sleeps for 5 minutes then does a killall fetchmail and > ppp-off doesn't do two things: > > 1. It has no provision for the possibility of fetchmail still being in > action after 5 minutes (for example someone attaches a large file to an > e-mail) > > 2. It has no way of handling a situation where fetchmail has stalled and > needs to be restarted. > > Obviously, my scripting skills aren't that great.
I just thought of an interesting fix for this... (note my shell scripting sucks...but you should be able to get the general idea from this..also I just cooked this up...pulled it right out of my ass) #!/bin/bash # note im not making ppp-mail is just a place holder # ...its an example anyway ;) if [ -f /var/run/ppp-mail ] fetchmail rm -f /var/run/ppp-mail exit 0 fi touch /var/run/ppp-mail $0 & # If you didn't have the test above this would make a mess exit 0 -- /* -- Stephen Carpenter <[EMAIL PROTECTED]> --- <[EMAIL PROTECTED]>------------ */ E-mail "Bumper Stickers": "A FREE America or a Drug-Free America: You can't have both!" "honk if you Love Linux" -- Unsubscribe? mail -s unsubscribe [EMAIL PROTECTED] < /dev/null