Merge branch 'master' into u/cimryan/fix_errors_on_startup

This commit is contained in:
cimryan
2018-10-22 19:47:08 -07:00
3 changed files with 15 additions and 14 deletions

View File

@@ -20,7 +20,7 @@ If you prefer not to run the script, it's also a useful reference for the steps
1. Run the following commands:
```
wget https://raw.githubusercontent.com/cimryan/teslausb/master/mac_linux_archive/setup-piForHeadlessConfig.sh
chmod +x update-rpi-mac-linux.sh
chmod +x setup-piForHeadlessConfig.sh
```
1. Set your SSID (Wifi network name) and WIFIPASS environment variables. The script will insert them into the `wpa_supplicant.conf` when creating it:
@@ -29,7 +29,7 @@ If you prefer not to run the script, it's also a useful reference for the steps
export WIFIPASS=your_wifi_password_here
```
1. Run the script:
`./update-rpi-mac-linux.sh`
`./setup-piForHeadlessConfig.sh`
1. If all goes well, the script will report:
`-- Files updated and ready for Wifi and SSH over USB --`
1. Eject the SD card safely, insert into your Pi, and reboot. If the Pi is connected over USB to your host, and/or if the Wifi setup went correctly, you should be able to `ssh pi@raspberrypi.local`. The default password is `raspberry`.

View File

@@ -44,14 +44,18 @@ if ([System.IO.File]::Exists("$wpaSupplicantConfPath")) {
del "$wpaSupplicantConfPath"
}
"ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev`
update_config=1`
`
network={`
ssid=`"$wifiSSID`"`
psk=`"$wifiPSK`"`
key_mgmt=WPA-PSK`
}`
" | Out-File -FilePath "$wpaSupplicantConfPath" -Encoding utf8
$wpaSupplicantConfContent=@"
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="$wifiSSID"
psk="$wifiPSK"
}
"@
$utf8 = New-Object System.Text.UTF8Encoding $false
Set-Content -Value $utf8.GetBytes($wpaSupplicantConfContent) -Encoding Byte -Path "$wpaSupplicantConfPath"
Write-Verbose "All done."

View File

@@ -4,7 +4,6 @@ REPO=cimryan
BRANCH=master
user_enabled_pushover=false
if ! [ $(id -u) = 0 ]
then
echo "STOP: Run sudo -i."
@@ -43,8 +42,6 @@ function check_pushover_enabled () {
fi
}
check_pushover_enabled
function check_archive_server_reachable () {
echo "Verifying that the archive server $archiveserver is reachable..."
local serverunreachable=false