*- On 15 Jun, Joop Stakenborg wrote about "Re: ip-up scripts not running" > On Mon, Jun 14, 1999 at 07:42:12PM +0100, Alisdair McDiarmid wrote: > [...] >> >> Also, I connect several times during a session: is there a way to >> start fetchmail from ip-up only if it's not running already? >> > > I run this from ip-up.d, it is a shell script: > > ------------------------------------------------------ > #!/bin/sh > if ifconfig|grep ppp0; then > if ! ps ax|grep fetchmail|grep -v grep; then > fetchmail -d300 > fi > fi > ----------------------------------------------------- > > Substitute 'fetchmail -d300' by any fetchmail command you like.
In daemon mode fetchmail will only allow one process per user anyways. So if you try and start a second one it just wakes the current process and grabs the mail. From the man page: Normally, calling fetchmail with a daemon in the backĀ ground sends a wakeup signal to the daemon, forcing it to poll mailservers immediately. (The wakeup signal is SIGHUP if fetchmail is running as root, SIGUSR1 otherĀ wise.) The wakeup action also clears any `wedged' flags indicating that connections have wedged due to failed authentication or multiple timeouts. -- Brian --------------------------------------------------------------------- Mechanical Engineering [EMAIL PROTECTED] Purdue University http://www.ecn.purdue.edu/~servis ---------------------------------------------------------------------