Skip to content

Instantly share code, notes, and snippets.

@resmo
Created September 30, 2010 14:41
Show Gist options
  • Save resmo/604680 to your computer and use it in GitHub Desktop.
Save resmo/604680 to your computer and use it in GitHub Desktop.
$ sudo touch /etc/NetworkManager/dispatcher.d/hotspot.sh
$ sudo chmod +x /etc/NetworkManager/dispatcher.d/hotspot.sh
$ sudo echo '#!/bin/bash
IF=$1
STATUS=$2
if [ "$STATUS" = "up" ] && [ "$IF" = "wlan0" ]; then
curl -d "param1=value1&param2=value2" http://example.com/resource.cgi
fi' > /etc/NetworkManager/dispatcher.d/hotspot.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment