From 275b8bdf2c4789fac4074bd9c68442d6fb4afe26 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Fri, 19 May 2023 20:14:13 +0200 Subject: [PATCH] hostname --- bash/ovh-rescue.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bash/ovh-rescue.sh b/bash/ovh-rescue.sh index bfe0bf2..bcd66c4 100644 --- a/bash/ovh-rescue.sh +++ b/bash/ovh-rescue.sh @@ -1,4 +1,5 @@ function ovh-rescue-configure { +local host="${1}" local packages=( 'byobu' 'mosh' ) @@ -24,7 +25,7 @@ deb https://deb.debian.org/debian-security buster/updates main contrib non-free # bash / rc main_link_bashrc # host name - hostname 'ovh' + hostname "${host}" # locales echo -n "\ en_US.UTF-8 UTF-8 @@ -100,7 +101,7 @@ if [ "${host}" ] ; then rsync --delete --recursive "${MAIN_BASH_ROOT}/" "${user_host}:/etc/bash/" # call setup # TODO variable - ssh "${user_host}" -- "source '/etc/bash/main.sh' ; ovh-rescue-configure" + ssh "${user_host}" -- "source '/etc/bash/main.sh' ; ovh-rescue-configure '${host}'" # create session ssh "${user_host}" -- byobu new-session -d # send keys