title: how to post scripts to networkmanager's dispatcher.d directory
body: <p>Ubuntu 10.10 64bit athalon, gnome</p>
  
  <p>My basic scenario is I'm connecting to a VPN service (via newtworkmanager pptp protocol) and I'm transferring private data (hence VPN). The service goes down intermittantly and that's alright, probably due to my ISP/OS/VPN. What is not good is that my applications will then continue to transmit data via the eth0 default route and thats not cool. After some looking around I'm suspecting the best way to deal with this is to post scripts into /etc/NetworkManager/dispatcher.d. In short, the networkmanager service will execute scripts in this directory (and pass arguments to the scripts) when anything about the network changes.</p>
  
  <p>My problem is that I can't get any of my scripts to execute. They all have, per the manpage, 0755 permissions and owned by root, but when I change the network state by unplugging ethernet cable, my scripts don't execute. I can execute them from the command line, but not automatically via the dispatcher....</p>
  
  <p>an example script:</p>
  
  <pre><code>#!/bin/sh -e
  
  
  exec /usr/bin/wmctrl -c qBittorrent
  
  exit 0
  </code></pre>
  
  <p>This script is intentionally simple for testing purposes..
  I can post whatever else would be helpful. </p>