init
This commit is contained in:
parent
8d993dadd9
commit
d85e6ca44d
@ -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))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user