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;