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