Created
October 15, 2015 13:24
-
-
Save dsprenkels/0a90ed4797f7b669031c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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