diff --git a/bash/hetzner-rescue.sh b/bash/hetzner-rescue.sh index 8aae4d3..261c7e5 100644 --- a/bash/hetzner-rescue.sh +++ b/bash/hetzner-rescue.sh @@ -1,5 +1,5 @@ function hetzner-rescue-configure { -local host="${1}" +local hostname="${1}" local package local packages=( 'mosh' @@ -29,7 +29,7 @@ deb https://deb.debian.org/debian-security bookworm-security main non-free-firmw main_link_bashrc mv .bashrc .bashrc.old # host name - hostname "${host}" + hostname "${hostname}" # locales echo -n "\ en_US.UTF-8 UTF-8 @@ -102,7 +102,8 @@ function hetzner-rescue-install { function hetzner-rescue-upload { local host="${1}" -if [ "${host}" ] ; then +local hostname="${2}" +if [ "${hostname}" ] ; then local user='root' # local user_host="${user}@${host}" @@ -116,7 +117,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' ; hetzner-rescue-configure '${host}'" + ssh "${user_host}" -- "source '/etc/bash/main.sh' ; hetzner-rescue-configure '${hostname}'" # create session ssh "${user_host}" -- byobu new-session -d # send keys