This commit is contained in:
Konano 2023-07-16 01:17:19 +08:00
parent c51791344a
commit 8d993dadd9

View File

@ -5,10 +5,10 @@ check_google_access() {
local response=$(curl -s -o /dev/null -w "%{http_code}" -m 5 "http://www.google.com") local response=$(curl -s -o /dev/null -w "%{http_code}" -m 5 "http://www.google.com")
if [ "$response" -eq 200 ]; then if [ "$response" -eq 200 ]; then
echo "Intenet: abroad" echo "Internet: abroad"
abroad=1 abroad=1
else else
echo "Intenet: internal" echo "Internet: internal"
abroad=0 abroad=0
fi fi
} }
@ -27,7 +27,8 @@ configure_ssh_keygen() {
if [[ -z "$response" ]] || [[ $response =~ ^[Yy]$ ]]; then if [[ -z "$response" ]] || [[ $response =~ ^[Yy]$ ]]; then
mkdir -p ~/.ssh mkdir -p ~/.ssh
ssh-keygen -t ed25519 -C "ubuntu" read -p "sshkey 的名字: " keyname
ssh-keygen -t ed25519 -C $keyname
fi fi
} }