API key: use space separator, fix error-capture bug; add conf_sync and missing files from dev

unRAID API rejects underscores and hyphens in key names — only letters, numbers,
and spaces allowed. Varaverk_HOST1 / Varaverk_Gmer4Lfe both fail; now uses
"Varaverk <hostname>" (space). Also adds monitor_remote.php, conf_populate.sh,
and conf_sync.sh from dev branch that were missing from production.
This commit is contained in:
Gmer4Lfe
2026-06-04 16:17:47 -04:00
parent a41adfe020
commit b7894681e6
4 changed files with 495 additions and 185 deletions
+20
View File
@@ -0,0 +1,20 @@
<?php
header('Content-Type: application/json');
header('Cache-Control: no-cache, no-store');
require_once dirname(__DIR__) . '/include/monitor.php';
$cacheFile = '/tmp/vv_cache_monitor_remote.json';
$cacheTTL = 3600;
if (!isset($_GET['live']) && file_exists($cacheFile) && (time() - filemtime($cacheFile)) < $cacheTTL) {
echo file_get_contents($cacheFile);
exit;
}
$out = json_encode([
'remote_hosts' => vv_remote_hosts_stats(),
'ts' => time(),
]);
file_put_contents($cacheFile, $out);
echo $out;