From 754c15b1fa1a729e58262d8750b2d687d71313f2 Mon Sep 17 00:00:00 2001 From: LamGC Date: Sat, 28 Jan 2023 20:11:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20sshkey-url=20=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E7=9A=84=20bug.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- conf-sshd.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/conf-sshd.sh b/conf-sshd.sh index 90c7618..3364dad 100644 --- a/conf-sshd.sh +++ b/conf-sshd.sh @@ -43,8 +43,7 @@ get_param_value() { done } -# 检查并更新 SSH key 地址. -if [ $(has_param "-k" "--sshkey-url") == "true" ]; then +use_param_keys_url() { local new_sshkey_url=$(get_param_value "-k" "--sshkey-url") if [ "$new_sshkey_url" == "" ]; then echo "Please specify the URL of the SSH public key." @@ -52,6 +51,11 @@ if [ $(has_param "-k" "--sshkey-url") == "true" ]; then fi sshkey_url=$new_sshkey_url echo "A new SSH keys URL has been specified: $sshkey_url" +} + +# 检查并更新 SSH key 地址. +if [ $(has_param "-k" "--sshkey-url") == "true" ]; then + use_param_keys_url fi # 帮助信息.