mirror of
https://github.com/hassio-addons/addon-tasmoadmin.git
synced 2025-05-04 11:01:27 +00:00
🚑 Fixes SSL support for OTA server
This commit is contained in:
parent
efed129ae1
commit
df688cbae2
1 changed files with 22 additions and 1 deletions
|
@ -32,5 +32,26 @@ if [[ "$?" -ne 0 ]];
|
||||||
then
|
then
|
||||||
hass.die 'Patching SonWEB SelfUpdate failed'
|
hass.die 'Patching SonWEB SelfUpdate failed'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
hass.log.debug 'Applied SonWEB SelfUpdate fix'
|
hass.log.debug 'Applied SonWEB SelfUpdate fix'
|
||||||
|
|
||||||
|
patch -F2 -R --ignore-whitespace \
|
||||||
|
/var/www/sonweb/pages/device_update.php << 'PATCH'
|
||||||
|
--- device_update.php 2018-05-23 21:31:36.000000000 +0200
|
||||||
|
+++ device_update.php 2018-05-23 21:30:19.000000000 +0200
|
||||||
|
@@ -5,7 +5,7 @@
|
||||||
|
$subdir = str_replace( "\\", "/", $subdir );
|
||||||
|
$subdir = $subdir == "/" ? "" : $subdir;
|
||||||
|
|
||||||
|
- $otaServer = $_SERVER['REQUEST_SCHEME'] . "://".$localIP.":".$_SERVER[ "SERVER_PORT" ]._BASEURL_."";
|
||||||
|
+ $otaServer = "http://".$localIP.":".$_SERVER[ "SERVER_PORT" ]._BASEURL_."";
|
||||||
|
|
||||||
|
if ( isset( $_POST[ 'minimal_firmware_path' ] ) && !empty( $_POST[ 'minimal_firmware_path' ] ) ) {
|
||||||
|
$ota_minimal_firmware_url = $otaServer."data/firmwares/sonoff-minimal.bin";
|
||||||
|
PATCH
|
||||||
|
|
||||||
|
# shellcheck disable=SC2181
|
||||||
|
if [[ "$?" -ne 0 ]];
|
||||||
|
then
|
||||||
|
hass.die 'Patching SonWEB OTA over HTTPS failed'
|
||||||
|
fi
|
||||||
|
hass.log.debug 'Applied SonWEB OTA over HTTPS fix'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue