Created
July 14, 2019 08:53
-
-
Save dittmaraz/7bb9390328e243c84da90c235c1d4c39 to your computer and use it in GitHub Desktop.
This script enables a Raspberry Pi Zero W for headless configuration.
This file contains hidden or 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/sh | |
# This script enables a Raspberry Pi Zero W for headless configuration. | |
clear | |
lsblk | |
read -p "Enter the path to your SDcard: " SDCARDPATH | |
# TODO: Validate SDCARDPATH | |
cd $SDCARDPATH | |
read -p "Enter name of network: " NONET | |
read -p "Enter network password: " NOPASS | |
tee wpa_supplicant.conf <<EOF | |
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev | |
update_config=1 | |
country=US | |
network={ | |
ssid="$NONET" | |
psk="$NOPASS" | |
scan_ssid=1 | |
} | |
EOF | |
echo "enable_uart=1" >>config.txt | |
touch ssh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment