Skip to content

Commit efed617

Browse files
committed
use specific version and update library on every connect
1 parent 224ffbd commit efed617

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

src/YunMQTTClient.cpp

+3-10
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,11 @@ void YunMQTTClient::begin(const char * hostname, int port) {
1616
}
1717

1818
int YunMQTTClient::installBridge() {
19-
boolean f1 = FileSystem.exists("/usr/mqtt/mqtt.py");
20-
boolean f2 = FileSystem.exists("/usr/mqtt/bridge.py");
21-
22-
if(f1 && f2) {
23-
return 1;
24-
}
25-
2619
Process p;
2720

28-
int r1 = p.runShellCommand("mkdir -p /usr/mqtt");
29-
int r2 = p.runShellCommand("wget https://raw.githubusercontent.com/256dpi/arduino-mqtt/master/yun/mqtt.py --no-check-certificate -O /usr/mqtt/mqtt.py");
30-
int r3 = p.runShellCommand("wget https://raw.githubusercontent.com/256dpi/arduino-mqtt/master/yun/bridge.py --no-check-certificate -O /usr/mqtt/bridge.py");
21+
int r1 = p.runShellCommand("mkdir -p /usr/arduino-mqtt");
22+
int r2 = p.runShellCommand("wget -N https://raw.githubusercontent.com/256dpi/arduino-mqtt/v1.7.0/yun/mqtt.py --no-check-certificate -P /usr/arduino-mqtt");
23+
int r3 = p.runShellCommand("wget -N https://raw.githubusercontent.com/256dpi/arduino-mqtt/v1.7.0/yun/bridge.py --no-check-certificate -P /usr/arduino-mqtt");
3124

3225
boolean success = r1 == 0 && r2 == 0 && r3 == 0;
3326

0 commit comments

Comments
 (0)