Last active
December 21, 2018 12:06
-
-
Save sammachin/d5b4ce8e5112f87228a7c4bfbf1cf9ad to your computer and use it in GitHub Desktop.
PI Starter
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 | |
CARDPATH=$1 | |
#Enable SSH | |
touch $CARDPATH/ssh | |
#Configure WiFi | |
cp wpa_supplicant.conf $CARDPATH/wpa_supplicant.conf | |
#Enable USB Networking (pi zero) | |
echo "dtoverlay=dwc2" >> $CARDPATH/config.txt | |
sed -e 's/rootwait/& modules-load=dwc2,g_ether/' -i .backup $CARDPATH/cmdline.txt |
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
country=GB | |
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev | |
update_config=1 | |
network={ | |
ssid="NETWORK" | |
psk="PASSWORD" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
CARDPATH is the path to the SD card mounted on your mac eg /Volumes/BOOT