Created
January 7, 2014 19:22
-
-
Save wch/8305204 to your computer and use it in GitHub Desktop.
Script for restarting wpa_supplicant in debug mode
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 | |
# set wpa_supplicant debug level to 1, disable timestamps, disable show_keys | |
[ "$UID" == 0 ] || { echo "Only root can run this"; exit 0;} | |
LOG="/var/log/wpa_supplicant.log" | |
echo "Stopping NetworkManager" | |
service network-manager stop | |
sleep 1 | |
echo "Killing current wpa_supplicant" | |
pkill -9 wpa_supplicant$ | |
sleep 1 | |
echo "Starting wpa_supplicant in DBUS & DEBUG mode, log is in $LOG" | |
wpa_supplicant -dd -u -f $LOG -B | |
sleep 1 | |
echo "Starting NetworkManager" | |
service network-manager start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
May be too late. In the latest wpa_supplicant, you have to enable logging by building it with DEBUG_LOG_FILE=y in the .config file to enable the -f flag.