From dab8d62e95d6326769568313a488e0cff60fe484 Mon Sep 17 00:00:00 2001 From: Gmer4Lfe Date: Sat, 6 Jun 2026 18:09:37 -0400 Subject: [PATCH] =?UTF-8?q?Fix=20API=20key=20detection=20=E2=80=94=20name?= =?UTF-8?q?=20is=20'Varaverk=20',=20not=20'Varaverk'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Plugin/unraid/include/partnership.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Plugin/unraid/include/partnership.php b/Plugin/unraid/include/partnership.php index fa0984e..7e8b811 100644 --- a/Plugin/unraid/include/partnership.php +++ b/Plugin/unraid/include/partnership.php @@ -248,7 +248,9 @@ function vv_pt_nodes(): array { $apiKeySet = false; $apiKeyPreview = ''; if ($isMe) { - $apiOut = shell_exec('/usr/local/sbin/unraid-api apikey --name "Varaverk" --json /dev/null'); + $hn = trim((string)shell_exec("hostname -s 2>/dev/null | sed 's/^[Uu][Nn][Rr][Aa][Ii][Dd]-//'")) ?: 'Varaverk'; + $keyName = 'Varaverk ' . $hn; + $apiOut = shell_exec('/usr/local/sbin/unraid-api apikey --name ' . escapeshellarg($keyName) . ' --json /dev/null'); $apiData = json_decode(trim($apiOut ?? ''), true); if (is_array($apiData) && !empty($apiData['key'])) { $apiKeySet = true;