Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'ip-up script' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
ip-up script
Authored by: frane on Jun 02, '02 10:35:52AM

You can create a script called ip-up in /private/etc/ppp. Make that file executable and system will execute it every time you make a new dial-up connection.
Example:

root# more /private/etc/ppp/ip-up
#!/bin/sh
cat /var/run/natd.pid | awk '{ system ("kill -HUP "$1); exit }'



[ Reply to This | # ]
ip-up script
Authored by: Corydon76 on Jan 08, '03 06:59:23PM

Backticks make it easier.

kill -HUP `cat /var/run/pppd0.pid`



[ Reply to This | # ]
ip-up script
Authored by: capmikee on Aug 08, '04 11:30:30AM

I noticed in /tmp/ppp.log the following line after disconnecting from the menu bar:

Sun Aug 8 11:33:10 2004 : Terminating on signal 15.

Signal 15 is the TERM signal, not the HUP signal. I don't know if it makes much difference, but that's how the system does it.

Not being an awk user, I would use backticks instead:

kill -TERM `cat /var/run/ppp0.pid`

Remember, those are backticks, not apostrophes.



[ Reply to This | # ]