summaryrefslogtreecommitdiffstats
path: root/ifupdown/if-down
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2014-08-05 15:05:03 (EDT)
committer P. J. McDermott <pj@pehjota.net>2014-08-05 15:05:03 (EDT)
commit5e7becab2f678dfadbbf0d7633a6dba634f3d0a9 (patch)
tree1c4626e391b180c219b02e80296fc30cf07cf9d9 /ifupdown/if-down
parente1f7888d31f6bbaa5844a4a494488d6e0169419e (diff)
Add network hook scripts
Diffstat (limited to 'ifupdown/if-down')
-rwxr-xr-xifupdown/if-down10
1 files changed, 10 insertions, 0 deletions
diff --git a/ifupdown/if-down b/ifupdown/if-down
new file mode 100755
index 0000000..6915ade
--- /dev/null
+++ b/ifupdown/if-down
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+set -eu
+
+if [ "x${IFACE#wlan}" != "x${IFACE}" ]; then
+ if [ -f "/var/run/wpa_supplicant.${IFACE}.conf" ]; then
+ wpa_cli -p/var/run/wpa_supplicant -i${IFACE} terminate
+ rm "/var/run/wpa_supplicant.${IFACE}.conf"
+ fi
+fi