Last active
July 16, 2020 17:17
-
-
Save maheshsenni/e5d4453ca631f045f549c5e321fcd4a7 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
# Enable SSH | |
echo 'ssh' >/tmp/1/ssh | |
# Configure WiFi | |
cat > /tmp/1/wpa_supplicant.conf << EOF | |
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev | |
update_config=1 | |
country=<TWO_LETTER_ISO_COUNTRY_CODE> | |
network={ | |
ssid="<WIFI_NETWORK_NAME>" | |
psk="<WIFI_PASSWORD>" | |
key_mgmt=WPA-PSK | |
} | |
EOF |
@tcarreira Updated. Thanks for letting me know. Looks a lot cleaner with heredoc.
@tcarreira Updated. Thanks for letting me know. Looks a lot cleaner with heredoc.
you are welcome :)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You could use heredocs to create wpa_supplicant.conf, in order to make this easier to read: https://gist.github.com/tcarreira/6fb84f37e7409b026faf37d45db5016b