Guest User

Untitled

a guest
Dec 7th, 2016
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. #!/bin/sh
  2. #
  3. # Automatically try to connect to 'MyWiFi' when WiFi is enabled
  4. #
  5.  
  6. # the output of nmcli should be in English
  7. LC_ALL=C
  8.  
  9. # loop for a while until NetworkManager is accepting commands
  10. while [ "$(nmcli -t -f WIFI,STATE nm)" = 'enabled:disconnected' ]
  11. do
  12. nmcli con up id MyWiFi
  13. sleep 5
  14. done
  15.  
  16. exit 0
Add Comment
Please, Sign In to add comment