How to run a script after bringing up a particular network interface (ppp0)
Hi.
Whenever I establish, or reestablish a network connection - ppp0 in particular - I need to upload my IP to a certain place on a server. Now this upload script works fine, I have set it up so it uploads the IP on boot-time. But sometimes, my connection gets severed, and I need to upload the new IP again. Now, how do I make my script run everytime the ppp or any other connection goes up? Please help. --polemon |
You could accomplish this a couple of ways.
1. You could run a cron job that runs the script every 5 minutes. 2. You could call the script from /etc/ppp/ip-up |
I made something totally different...
But it works fine, so I'll post it here: I made my own ppp script, ones that handles most of the preliminary work, for uploading my IP to a certain server. this file is: /etc/ppp/ip-up-post.local as the name implyes, it is processed _after_ the connection was established, or was tried (and failed) to be established. That script is only interesting for my DSL connection, so I added it right after the corresponding command in /etc/sysconfig/network-scripts/ifup-ppp: Code:
(rest of code)... |
All times are GMT -5. The time now is 04:17 PM. |