summaryrefslogtreecommitdiffstats
path: root/ifupdown/if-down
diff options
context:
space:
mode:
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