Skip to content

Instantly share code, notes, and snippets.

@dsprenkels
Created October 15, 2015 13:24
Show Gist options
  • Save dsprenkels/0a90ed4797f7b669031c to your computer and use it in GitHub Desktop.
Save dsprenkels/0a90ed4797f7b669031c to your computer and use it in GitHub Desktop.
#!/bin/sh
if ["$IFACE" != "wlan0"]; then
exit 0
fi
if ["$MODE" != "start"]; then
exit 0
fi
SSID=$(nm-tool | grep \* | tail -n1 | sed 's/^\s*\*\([a-zA-Z0-9._-]*\):.*$/\1/')
case "$SSID" in
slek-netwerk)
service autofs start || true
;;
*)
service autofs stop || true
;;
esac
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment