Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- #
- # Automatically try to connect to 'MyWiFi' when WiFi is enabled
- #
- # the output of nmcli should be in English
- LC_ALL=C
- # loop for a while until NetworkManager is accepting commands
- while [ "$(nmcli -t -f WIFI,STATE nm)" = 'enabled:disconnected' ]
- do
- nmcli con up id MyWiFi
- sleep 5
- done
- exit 0
Add Comment
Please, Sign In to add comment