upload
This commit is contained in:
parent
c7659c47fa
commit
bee3710cde
1 changed files with 14 additions and 8 deletions
|
@ -18,10 +18,14 @@ Dpkg::Progress True;
|
||||||
" >"/etc/apt/apt.conf.d/apt.conf"
|
" >"/etc/apt/apt.conf.d/apt.conf"
|
||||||
# apt / sources
|
# apt / sources
|
||||||
printf "%s" "\
|
printf "%s" "\
|
||||||
deb https://deb.debian.org/debian ${release} main non-free-firmware contrib non-free
|
deb https://deb.debian.org/debian \
|
||||||
deb https://deb.debian.org/debian ${release}-backports main non-free-firmware contrib non-free
|
${release} main non-free-firmware contrib non-free
|
||||||
deb https://deb.debian.org/debian ${release}-updates main non-free-firmware contrib non-free
|
deb https://deb.debian.org/debian \
|
||||||
deb https://deb.debian.org/debian-security ${release}-security main non-free-firmware contrib non-free
|
${release}-backports main non-free-firmware contrib non-free
|
||||||
|
deb https://deb.debian.org/debian \
|
||||||
|
${release}-updates main non-free-firmware contrib non-free
|
||||||
|
deb https://deb.debian.org/debian-security \
|
||||||
|
${release}-security main non-free-firmware contrib non-free
|
||||||
" >"/etc/apt/sources.list"
|
" >"/etc/apt/sources.list"
|
||||||
# bash / rc
|
# bash / rc
|
||||||
main_link_bashrc
|
main_link_bashrc
|
||||||
|
@ -106,7 +110,8 @@ ovh_rescue_install() {
|
||||||
|
|
||||||
ovh_rescue_upload() {
|
ovh_rescue_upload() {
|
||||||
local host="${1}"
|
local host="${1}"
|
||||||
if [ "${host}" ]; then
|
local hostname="${2}"
|
||||||
|
if [ "${hostname}" ]; then
|
||||||
local user="root"
|
local user="root"
|
||||||
#
|
#
|
||||||
local user_host="${user}@${host}"
|
local user_host="${user}@${host}"
|
||||||
|
@ -117,11 +122,12 @@ ovh_rescue_upload() {
|
||||||
-o "StrictHostKeyChecking=accept-new" \
|
-o "StrictHostKeyChecking=accept-new" \
|
||||||
"${user_host}"
|
"${user_host}"
|
||||||
# upload root
|
# upload root
|
||||||
rsync --delete --recursive "${MAIN_BASH_ROOT}/" "${user_host}:/etc/bash/"
|
rsync --delete --recursive \
|
||||||
|
"${MAIN_BASH_ROOT}/" "${user_host}:/etc/bash/"
|
||||||
# call setup
|
# call setup
|
||||||
# TODO variable
|
# TODO variable
|
||||||
ssh "${user_host}" -- \
|
ssh "${user_host}" -- "\
|
||||||
"source \"/etc/bash/main.sh\" ; ovh_rescue_configure \"${host}\""
|
source \"/etc/bash/main.sh\" ; ovh_rescue_configure \"${hostname}\""
|
||||||
# create session
|
# create session
|
||||||
ssh "${user_host}" -- byobu new-session -d
|
ssh "${user_host}" -- byobu new-session -d
|
||||||
# send keys
|
# send keys
|
||||||
|
|
Loading…
Reference in a new issue