[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

ppp-related script not running correctly



Hello;

I created a script (called fetchmail-on) and placed it in
'/etc/ppp/ip-up.d/' so that it will get executed when ppp connects. For
some reason it doesn't get execute 'fetchmail'. I can sit there (with
'ps aux|grep fetchmail') and see that the script itself gets executed. I
can even directly execute the scrip and it runs correctly. It's just
when pppd runs it, it fails to do it's job. 

Here is what the script looks like:

---cut-here---
#!/bin/bash 

# take a little nap for 2 minutes just in case the connection is crap. 
sleep 2m 

# now start the program we've all been waiting for! 
fetchmail -d 600 --syslog --fetchmailrc /home/rbf/.fetchmailrc
--cut-here---

File permissions: 

1.0k -rwxrwxr-x    1 root     root          213 Aug 20 08:19
/etc/ppp/ip-up.d/fetchmail-on

I've tried different sleep times thinking maybe pppd has a time limit on
how long a script can take, but it doesn't seem to make a difference. 

The companion to the script is '/etc/ppp/ip-down.d/fetchmail-off' it
looks like:

---cut-here---
#!/bin/bash 

# get rid of the starter script if it didn't finish yet.
killall fetchmail-on

# get rid of the actual program if it's running.
killall fetchmail
---cut-here---

But I doubt that has anything to do with why it doesn't get executed.
'pon' gets executed by a normal user (me: rbf). This is on a potato
install. 

Any ideas what might be going wrong? 




TIA,

Ron

Attachment: pgpgoS0q1_cLy.pgp
Description: PGP signature


Reply to: