forked from EA7KDO/NX4832K035
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcpywpa.sh
executable file
·30 lines (27 loc) · 935 Bytes
/
cpywpa.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash
#########################################################
# Nextion Support for Nextion screen. Used to copy #
# wpa_supplicant file to working location #
# #
# KF6S 05-01-2019 #
#########################################################
sudo mount -o remount,rw /boot
sleep 1s
sudo cp /usr/local/etc/Nextion_Support/wpa_supplicant.conf /boot/wpa_supplicant.conf
status=$?
if test $status -eq 0
then
echo "Supplicant copy OK!"
else
sudo mount -o remount,rw /
sleep 1s
sudo cp /usr/local/etc/Nextion_Support/wpa_supplicant.conf /boot/wpa_supplicant
status-$?
if test $status -eq 0
then
echo "Second attempt to copy Supplicant OK!"
else
echo "Second attempt to copy Supplicant failed!"
fi
fi
sudo mount -o remount,ro /boot;