Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
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.

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .