Merge pull request #1053 from bergware/master

Use https for internet connectivity check
This commit is contained in:
tom mortensen
2022-03-17 14:21:50 -07:00
committed by GitHub
4 changed files with 10 additions and 12 deletions

View File

@@ -973,8 +973,6 @@ This can be an image file with a specific size or a dedicated folder.
If the system needs to create a new docker image file, this is the default size to use specified in GB.
To resize an existing image file, specify the new size here. Next time the Docker service is started the file (and file system) will be increased to the new size (but never decreased).
WARNING: resizing the docker image file will empty its content. Docker containers need to be re-installed afterwards.
:end
:docker_vdisk_location_help:

View File

@@ -1,7 +1,7 @@
<?PHP
/* Copyright 2005-2021, Lime Technology
* Copyright 2014-2021, Guilherme Jardim, Eric Schultz, Jon Panozzo.
* Copyright 2012-2021, Bergware International.
/* Copyright 2005-2022, Lime Technology
* Copyright 2014-2022, Guilherme Jardim, Eric Schultz, Jon Panozzo.
* Copyright 2012-2022, Bergware International.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License version 2,
@@ -15,7 +15,7 @@
$docroot = $docroot ?? $_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp';
require_once "$docroot/plugins/dynamix.docker.manager/include/DockerClient.php";
$ncsi = exec("wget --spider -nv -T10 -t1 http://www.msftncsi.com/ncsi.txt 2>&1|grep -o 'OK'")=='OK';
$ncsi = exec("wget --spider --no-check-certificate -nv -T10 -t1 https://www.msftncsi.com/ncsi.txt 2>&1|grep -o 'OK'")=='OK';
$DockerTemplates = new DockerTemplates();
if ($ncsi) $DockerTemplates->downloadTemplates();
$DockerTemplates->getAllInfo($ncsi,$ncsi);

View File

@@ -1,6 +1,6 @@
<?PHP
/* Copyright 2005-2021, Lime Technology
* Copyright 2012-2021, Bergware International.
/* Copyright 2005-2022, Lime Technology
* Copyright 2012-2022, Bergware International.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License version 2,
@@ -27,7 +27,7 @@ function language($method, $arg = '') {
function check_plugin($arg, &$ncsi) {
// Get network connection status indicator (NCSI)
if ($ncsi===null) $ncsi = exec("wget --spider -nv -T10 -t1 http://www.msftncsi.com/ncsi.txt 2>&1|grep -o 'OK'");
if ($ncsi===null) $ncsi = exec("wget --spider --no-check-certificate -nv -T10 -t1 https://www.msftncsi.com/ncsi.txt 2>&1|grep -o 'OK'");
return $ncsi ? plugin('check',$arg) : false;
}

View File

@@ -1,7 +1,7 @@
#!/usr/bin/php -q
<?PHP
/* Copyright 2005-2021, Lime Technology
* Copyright 2012-2021, Bergware International.
/* Copyright 2005-2022, Lime Technology
* Copyright 2012-2022, Bergware International.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License version 2,
@@ -26,7 +26,7 @@ require_once "$docroot/webGui/include/Translations.php";
// check connectivity first
echo _("Checking connectivty")."...\n";
if (exec("wget --spider -nv -T10 -t1 http://www.msftncsi.com/ncsi.txt 2>&1|grep -o 'OK'")) {
if (exec("wget --spider --no-check-certificate -nv -T10 -t1 https://www.msftncsi.com/ncsi.txt 2>&1|grep -o 'OK'")) {
$check = popen('plugin checkall','r');
while (!feof($check)) echo fgets($check);
pclose($check);