−main_env_root

This commit is contained in:
Marc Beninca 2024-11-15 19:38:54 +01:00
parent bc7b4962f6
commit 4d888d9784
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F
2 changed files with 3 additions and 7 deletions

View file

@ -1,9 +1,5 @@
[ -n "${ENV}" ] || export ENV="/etc/shell/main.sh" [ -n "${ENV}" ] || export ENV="/etc/shell/main.sh"
main_env_root() {
dirname "${ENV}"
}
main_link_bashrc() { main_link_bashrc() {
local file="/etc/bash.bashrc" local file="/etc/bash.bashrc"
rm --force "${file}" rm --force "${file}"

View file

@ -66,11 +66,11 @@ rescue_upload() {
"${user_host}" "${user_host}"
# upload root # upload root
rsync --delete --recursive \ rsync --delete --recursive \
"$(main_env_root)" "${user_host}:/etc" "$(dirname "${ENV}")" "${user_host}:/etc"
# call setup # call setup
# TODO variable # TODO variable
ssh "${user_host}" -- "\ ssh "${user_host}" -- \
. \"/etc/bash/main.sh\" ; rescue_configure \"${hostname}\"" ". \"${ENV}\" ; 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