From 78d3ee6527108b20393f67a13e30595d4d9c90bf Mon Sep 17 00:00:00 2001 From: kory Date: Fri, 2 Oct 2026 14:52:05 +0800 Subject: [PATCH] fix: repair one-click installer --- deploy/install.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/deploy/install.sh b/deploy/install.sh index 7633fc1..f7d61f7 100755 --- a/deploy/install.sh +++ b/deploy/install.sh @@ -133,8 +133,8 @@ install_hub() { read -rp "请输入监听端口 (默认 9521): " HUB_PORT HUB_PORT=${HUB_PORT:-9521} - GEN_API_KEY=$(head -c 24 /dev/urandom | xxd -p) - GEN_PASS=$(head -c 16 /dev/urandom | xxd -p) + GEN_API_KEY=$(od -An -N24 -tx1 /dev/urandom | tr -d ' \n') + GEN_PASS=$(od -An -N16 -tx1 /dev/urandom | tr -d ' \n') read -rp "请输入 API Key (默认随机生成): " API_KEY API_KEY=${API_KEY:-$GEN_API_KEY} @@ -145,7 +145,6 @@ install_hub() { cat << ENV > "${CONF_DIR}/hub.env" VPS_COMMANDER_API_KEY=${API_KEY} VPS_COMMANDER_WEB_PASSWORD=${WEB_PASS} -ENV ENV chmod 0600 "${CONF_DIR}/hub.env"