pppd problems

pppd problems

Post by Jeroen de Vrie » Mon, 10 Jul 2000 04:00:00



Hi,

I want fetchmail reading my mail every hour...
The problem is that i have to make a connection to the internet
using a modem.

For making this connection a have several scripts which can make the
connection for me.

The problem is that i don't know when there is a usable connection so
that i can start the command fetchmail.

When i run the script ip-up (which use pppd adn chat) it returns
immediatly whith the prompt, and there is no exit code for 'connection made'
for e.g.

The question is: How can i check wether there is a connection so that i can
start
fethmail...

With regards

Jeroen de Vries

 
 
 

pppd problems

Post by Tim Hayn » Mon, 10 Jul 2000 04:00:00



Quote:> The question is: How can i check wether there is a connection so that i
> can start fethmail...

$ ping -i 2 -c 20 remote.site.com && fetchmail

That might be a way to do it...

~Tim
--
| Geek Code: GCS dpu s-:+ a-- C++++ UBLUAVHSC++++ P+++ L++ E--- W+++(--) N++
| w--- O- M-- V-- PS PGP++ t--- X+(-) b D+ G e++(*) h++(*) r--- y-          
| The sun is melting over the hills,         | http://piglet.is.dreaming.org/


 
 
 

pppd problems

Post by Jim Broughto » Mon, 10 Jul 2000 04:00:00



> Hi,

> I want fetchmail reading my mail every hour...
> The problem is that i have to make a connection to the internet
> using a modem.

> For making this connection a have several scripts which can make the
> connection for me.

> The problem is that i don't know when there is a usable connection so
> that i can start the command fetchmail.

> When i run the script ip-up (which use pppd adn chat) it returns
> immediatly whith the prompt, and there is no exit code for 'connection made'
> for e.g.

> The question is: How can i check wether there is a connection so that i can
> start
> fethmail...

> With regards

> Jeroen de Vries

 PPPD is actualy a fairly intelligent daemon. If you go not get a good
connect it will hang up the line do a user setable idle timeout then
dial again until it gets a good connect. In order to run fetchmail
upon connect you just need to insert the correct fetchmail commands
into /etc/ppp/ip-up or ip-up.local (a file what should be run by the
ip-up script.) You can also set this whole thing up using the CRON
daemon to kick it off every hour on the hour. To test a linkup condition
you can do a check for ppp0 (dont ask me how im no script programmer)
If it exists run fetchmail if not exit.

JIM

 
 
 

pppd problems

Post by Wayne E. Harla » Tue, 11 Jul 2000 04:00:00


Try reading the threads starting with "ip-up not being run by pppd" from about a
week ago.  pppd will not run anything that doesn't have the right permissions
and ownership, as I found out the *hard*way*.



> Hi,

> I want fetchmail reading my mail every hour... The problem is that i have to
> make a connection to the internet using a modem.

> For making this connection a have several scripts which can make the
> connection for me.

> The problem is that i don't know when there is a usable connection so that i
> can start the command fetchmail.

> When i run the script ip-up (which use pppd adn chat) it returns immediatly
> whith the prompt, and there is no exit code for 'connection made' for e.g.

> The question is: How can i check wether there is a connection so that i can
> start fethmail...

> With regards

> Jeroen de Vries

--
Thanks,


(I'd rather be a free electron than a loose cannon.)