Template/Update (Part 44)

* convert admin - config
 * test for presence of Memcached on enable
 * allow self-signed certs on domain self test
This commit is contained in:
Sarjuuk
2025-08-22 16:01:59 +02:00
parent f1b613cfa0
commit 3f8a1838c0
9 changed files with 260 additions and 17 deletions

View File

@@ -114,7 +114,7 @@ CLISetup::registerUtility(new class extends UtilityScript
CLI::write();
}
if (CLI::read(['idx' => ['', false, false, Cfg::PATTERN_CONF_KEY]], $uiIndex) && $uiIndex && $uiIndex['idx'] !== '')
if (CLI::read(['idx' => ['', false, false, Cfg::PATTERN_CONF_KEY_CHAR]], $uiIndex) && $uiIndex && $uiIndex['idx'] !== '')
{
$idx = array_search(strtolower($uiIndex['idx']), $cfgList);
if ($idx === false)
@@ -147,7 +147,7 @@ CLISetup::registerUtility(new class extends UtilityScript
CLI::write();
$setting = array(
'key' => ['option name', false, false, Cfg::PATTERN_CONF_KEY],
'key' => ['option name', false, false, Cfg::PATTERN_CONF_KEY_CHAR],
'val' => ['value']
);
if (CLI::read($setting, $uiSetting) && $uiSetting)
@@ -443,7 +443,13 @@ CLISetup::registerUtility(new class extends UtilityScript
private function testCase(&$protocol, &$host, $testFile, &$status) : bool
{
$res = get_headers($protocol.$host.$testFile, true);
// https://stackoverflow.com/questions/14279095/allow-self-signed-certificates-for-https-wrapper
$ctx = stream_context_create(array(
'ssl' => ['verify_peer' => false,
'allow_self_signed' => true]
));
$res = get_headers($protocol.$host.$testFile, true, $ctx);
if (!preg_match('/HTTP\/[0-9\.]+\s+([0-9]+)/', $res[0], $m))
return false;

View File

@@ -0,0 +1,2 @@
-- set on_set_fn check
UPDATE `aowow_config` SET `flags` = `flags` | 1024 WHERE `key` = 'cache_mode';