Paste your existing shared secret 不用用隐藏字符,然后如果默认目录已经有了内容,你也要放到脚本里面的默认提示里面如果不修改就直接回车选择默认值
Paste your existing shared secret 不用用隐藏字符,然后如果默认目录已经有了内容,你也要放到脚本里面的默认提示里面如果不修改就直接回车选择默认值
This commit is contained in:
+8
-2
@@ -109,7 +109,7 @@ if ask_yn "Generate a new random secret automatically?" "y"; then
|
||||
success "Generated secret: ${BOLD}${AUTH_SECRET}${RESET}"
|
||||
warn "Save this — you'll need it for every relay and your main server config."
|
||||
else
|
||||
ask_secret AUTH_SECRET "Paste your existing shared secret"
|
||||
ask AUTH_SECRET "Paste your existing shared secret" ""
|
||||
success "Using supplied secret."
|
||||
fi
|
||||
|
||||
@@ -245,7 +245,13 @@ for (( i=1; i<=RELAY_COUNT; i++ )); do
|
||||
fi
|
||||
|
||||
# ── Output directory ──────────────────────────────────────────────────────
|
||||
ask RELAY_DIR " Output directory for this relay's files" "/opt/netbird-relay"
|
||||
_DEFAULT_RELAY_DIR="/opt/netbird-relay"
|
||||
# If the default dir already has relay files, surface it as the default so
|
||||
# the user can confirm with Enter rather than retyping the path.
|
||||
if [[ -f "${_DEFAULT_RELAY_DIR}/relay.env" || -f "${_DEFAULT_RELAY_DIR}/docker-compose.yml" ]]; then
|
||||
warn " ${_DEFAULT_RELAY_DIR} already contains relay files (will be overwritten if confirmed)."
|
||||
fi
|
||||
ask RELAY_DIR " Output directory for this relay's files" "${_DEFAULT_RELAY_DIR}"
|
||||
# For self-signed mode, certs live inside the relay dir
|
||||
[[ "$TLS_MODE" == "3" ]] && CERT_HOST_PATH="${RELAY_DIR}/certs"
|
||||
RELAY_DIRS+=("$RELAY_DIR")
|
||||
|
||||
Reference in New Issue
Block a user