From ce78d12c506fcce4146649f69139d180a4f1dcff Mon Sep 17 00:00:00 2001 From: Javan R Date: Sun, 8 Mar 2020 00:09:29 +0100 Subject: [PATCH 1/2] don't require restart after wifi change --- backend/shell-scripts/change_router_ssidpw.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/shell-scripts/change_router_ssidpw.sh b/backend/shell-scripts/change_router_ssidpw.sh index c6b6c40..fbe7904 100644 --- a/backend/shell-scripts/change_router_ssidpw.sh +++ b/backend/shell-scripts/change_router_ssidpw.sh @@ -5,3 +5,6 @@ pw=$2; sudo sed -i "s/psk=.*/psk=\"$pw\"/" /etc/wpa_supplicant/wpa_supplicant.conf; sudo sed -i "s/ssid=.*/ssid=\"$ssid\"/" /etc/wpa_supplicant/wpa_supplicant.conf; + +# connect to wifi without reboot +sudo wpa_cli -i wlan0 reconfigure From c3e359f16831109c3727e049f32dd001f21298c7 Mon Sep 17 00:00:00 2001 From: Javan R Date: Tue, 10 Mar 2020 21:19:26 +0100 Subject: [PATCH 2/2] fixed thingspeak check which gave always error --- backend/check_thingspeak.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/check_thingspeak.php b/backend/check_thingspeak.php index 2136745..a161f2d 100644 --- a/backend/check_thingspeak.php +++ b/backend/check_thingspeak.php @@ -5,7 +5,7 @@ function is_channel_correct($writeKey) { - $filename = 'https://api.thingspeak.com/update?api_key='.$writeKey.'&field1=0'; + $filename = 'http://api.thingspeak.com/update?api_key='.$writeKey.'&field1=0'; $check = "0"; try { $content = @file_get_contents($filename);