If I forget to disconnect the PPTP VPN before closing the lid on my Mac, annoying things happen when I open the lid (wake it from sleep).

At best, network traffic stops until I disconnect the VPN. If I wait some minutes, it will disconnect itself. Or, if it's in a particularly annoying mood, the entire menu bar (all icons) will show a busy spinner for quite a while, preventing me from doing anything.

Anyone know a recipe to make PPTP disconnect as part of suspend to avoid all this?

Mac OS X 10.6.4.

link|improve this question

feedback

1 Answer

up vote 1 down vote accepted

Use sleepwatcher to run a custom script.

Edit:
bmargulies: "Do you happen to know would I disconnect the VPN from a command line?"

I haven't done this (disconnect via the command line) but here's a page I found with some sample scripts for establishing and disconnecting VPN connections. I'd start there.

link|improve this answer
Do you happen to know would I disconnect the VPN from a command line? – bmargulies Jul 21 '10 at 19:31
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.