Created
May 21, 2017 19:48
-
-
Save aarobc/9e3adb58adae0e528f4ee2c5b0d2e350 to your computer and use it in GitHub Desktop.
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/bash | |
cmd="am startservice \ | |
-n com.google.wifisetup/.WifiSetupService \ | |
-a WifiSetupService.Connect \ | |
-e ssid '$1' \ | |
-e passphrase '$2'" | |
echo $cmd | |
sesh=`screen -list | grep "Attached" | awk '{print $1;}'` | |
echo $sesh | |
screen -S $sesh -X stuff "$cmd^M" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment