Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@ceres-c
Forked from wch/wpa_debug.sh
Created January 8, 2018 10:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ceres-c/16a0b45067a39482b382592dd45071ae to your computer and use it in GitHub Desktop.
Save ceres-c/16a0b45067a39482b382592dd45071ae to your computer and use it in GitHub Desktop.
Script for restarting wpa_supplicant in debug mode under Arch linux (systemd)
#!/bin/bash
# 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"
systemctl stop NetworkManager
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"
systemctl start NetworkManager
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment