File tree 3 files changed +21
-2
lines changed
3 files changed +21
-2
lines changed Original file line number Diff line number Diff line change 5
5
sudo apt-get update
6
6
sudo apt-get install -y git iw dnsmasq hostapd screen curl build-essential python3-pip python3-setuptools python3-wheel python3-dev mosquitto haveged net-tools libssl-dev
7
7
8
- sudo -H python3 -m pip install --upgrade paho-mqtt tornado git+https://github.com/drbild/sslpsk.git@use-byte-string-for-identity-hints pycryptodomex
8
+ sudo -H python3 -m pip install --upgrade paho-mqtt tornado git+https://github.com/drbild/sslpsk.git pycryptodomex
9
9
10
10
echo " Ready to start upgrade"
Original file line number Diff line number Diff line change @@ -102,6 +102,17 @@ check_port () {
102
102
fi
103
103
}
104
104
105
+ check_firewall () {
106
+ if sudo systemctl stop firewalld.service & > /dev/null; then
107
+ echo " Attempting to stop firewalld.service"
108
+ echo " When done, enable with: ${bold} sudo systemctl start firewalld.service${normal} "
109
+ fi
110
+ if sudo ufw status | grep -qw active; then
111
+ sudo ufw disable
112
+ echo " When done, enable with: ${bold} sudo ufw enable${normal} "
113
+ fi
114
+ }
115
+
105
116
check_blacklist () {
106
117
if [ -e /etc/modprobe.d/blacklist-rtl8192cu.conf ]; then
107
118
echo " Detected /etc/modprobe.d/blacklist-rtl8192cu.conf"
@@ -125,5 +136,6 @@ check_port udp 6666 "detect unencrypted Tuya firmware"
125
136
check_port udp 6667 " detect encrypted Tuya firmware"
126
137
check_port tcp 1883 " run MQTT"
127
138
check_port tcp 8886 " run MQTTS"
139
+ check_firewall
128
140
check_blacklist
129
141
Original file line number Diff line number Diff line change @@ -94,7 +94,14 @@ while true; do
94
94
backupfolder=" ../backups/$timestamp "
95
95
mkdir -p " $backupfolder "
96
96
pushd " $backupfolder " > /dev/null || exit
97
- curl -JO http://10.42.42.42/backup
97
+
98
+ if ! curl -JOm 90 http://10.42.42.42/backup; then
99
+ echo " Could not fetch a complete backup"
100
+ read -p " Do you want to continue anyway? [y/N] " -n 1 -r
101
+ echo
102
+ [[ " $REPLY " =~ ^[Yy]$ ]] || break
103
+ sleep 2
104
+ fi
98
105
99
106
echo " ======================================================"
100
107
echo " Getting Info from IoT-device"
You can’t perform that action at this time.
0 commit comments