From d85e6ca44d609549e86bfd4571f29b4e5a4ace4d Mon Sep 17 00:00:00 2001 From: Konano Date: Sun, 16 Jul 2023 01:18:47 +0800 Subject: [PATCH] init --- init_root.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/init_root.sh b/init_root.sh index 29693f3..c8fa2ca 100755 --- a/init_root.sh +++ b/init_root.sh @@ -1,5 +1,7 @@ #!/bin/bash +scriptdir=$(dirname $(realpath $0)) + check_google_access() { abroad=0 local response=$(curl -s -o /dev/null -w "%{http_code}" -m 5 "http://www.google.com") @@ -27,13 +29,11 @@ configure_ssh_keygen() { if [[ -z "$response" ]] || [[ $response =~ ^[Yy]$ ]]; then mkdir -p ~/.ssh - read -p "sshkey 的名字: " keyname - ssh-keygen -t ed25519 -C $keyname + read -p "sshkey 的名字: " sshkeyname + ssh-keygen -t ed25519 -C $sshkeyname fi } check_google_access configure_ssh configure_ssh_keygen - -# scriptdir=$(dirname $(realpath $0))