daily pastebin goal
10%
SHARE
TWEET

Untitled

a guest Jan 16th, 2018 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2.  
  3. # set wpa_supplicant debug level to 1, disable timestamps, disable show_keys
  4.  
  5. [ "$UID" == 0 ] || { echo "Only root can run this"; exit 0;}
  6.  
  7. LOG="/var/log/wpa_supplicant.log"
  8.  
  9. echo "Stopping NetworkManager"
  10. systemctl stop NetworkManager
  11. sleep 1
  12.  
  13. echo "Killing current wpa_supplicant"
  14. pkill -9  wpa_supplicant$
  15. sleep 1
  16.  
  17. echo "Starting wpa_supplicant in DBUS & DEBUG mode, log is in $LOG"
  18. wpa_supplicant -dd -u -f $LOG -B
  19. sleep 1
  20.  
  21. echo "Starting NetworkManager"
  22. systemctl start NetworkManager
RAW Paste Data
Top