fix bug with reset apikey every install

This commit is contained in:
Дмитрий Саенко 2025-10-29 22:37:55 +03:00
parent b2efeec70f
commit 3f6205c3d5

View file

@ -141,7 +141,7 @@ config_after_install() {
/usr/local/x-ui/x-ui migrate
local existing_apiKey=$(/usr/local/x-ui/x-ui setting -show true | grep -oP 'apiKey: \K.*')
local existing_apiKey=$(/usr/local/x-ui/x-ui setting -show true | grep -oP 'apikey: \K.*')
if [[ -z "$existing_apiKey" ]]; then
local config_apiKey=$(gen_random_string 32)
/usr/local/x-ui/x-ui setting -apiKey "${config_apiKey}"