indent
This commit is contained in:
parent
bf1e7539fa
commit
5776a03fe4
1 changed files with 27 additions and 27 deletions
|
@ -101,33 +101,33 @@ rescue_hetzner_install() {
|
|||
}
|
||||
|
||||
rescue_hetzner_upload() {
|
||||
local host="${1}"
|
||||
local hostname="${2}"
|
||||
if [ "${hostname}" ] ; then
|
||||
local user='root'
|
||||
#
|
||||
local user_host="${user}@${host}"
|
||||
# remove fingerprints
|
||||
ssh-keygen -R "${host}"
|
||||
# copy ssh id
|
||||
ssh-copy-id \
|
||||
-o 'StrictHostKeyChecking=accept-new' \
|
||||
"${user_host}"
|
||||
# upload root
|
||||
rsync --delete --recursive "${MAIN_BASH_ROOT}/" "${user_host}:/etc/bash/"
|
||||
# call setup
|
||||
# TODO variable
|
||||
ssh "${user_host}" -- "source '/etc/bash/main.sh' ; rescue_hetzner_configure '${hostname}'"
|
||||
# create session
|
||||
ssh "${user_host}" -- byobu new-session -d
|
||||
# send keys
|
||||
ssh "${user_host}" -- byobu send-keys 'rescue_hetzner_install' 'C-m'
|
||||
# attach session
|
||||
mosh "${user_host}" -- byobu attach-session
|
||||
else
|
||||
echo 'Host?'
|
||||
return 1
|
||||
fi
|
||||
local host="${1}"
|
||||
local hostname="${2}"
|
||||
if [ "${hostname}" ] ; then
|
||||
local user='root'
|
||||
#
|
||||
local user_host="${user}@${host}"
|
||||
# remove fingerprints
|
||||
ssh-keygen -R "${host}"
|
||||
# copy ssh id
|
||||
ssh-copy-id \
|
||||
-o 'StrictHostKeyChecking=accept-new' \
|
||||
"${user_host}"
|
||||
# upload root
|
||||
rsync --delete --recursive "${MAIN_BASH_ROOT}/" "${user_host}:/etc/bash/"
|
||||
# call setup
|
||||
# TODO variable
|
||||
ssh "${user_host}" -- "source '/etc/bash/main.sh' ; rescue_hetzner_configure '${hostname}'"
|
||||
# create session
|
||||
ssh "${user_host}" -- byobu new-session -d
|
||||
# send keys
|
||||
ssh "${user_host}" -- byobu send-keys 'rescue_hetzner_install' 'C-m'
|
||||
# attach session
|
||||
mosh "${user_host}" -- byobu attach-session
|
||||
else
|
||||
echo 'Host?'
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
rescue_hetzner_wipe_8_8_0_init() {
|
||||
|
|
Loading…
Reference in a new issue