From e458a78afe8e58f5b5fcd4d7d3eb246c084bfb7d Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 2 Oct 2023 19:32:50 +0200 Subject: [PATCH] package --- bash/hetzner-rescue.sh | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/bash/hetzner-rescue.sh b/bash/hetzner-rescue.sh index a583197..3543a21 100644 --- a/bash/hetzner-rescue.sh +++ b/bash/hetzner-rescue.sh @@ -1,5 +1,6 @@ function hetzner-rescue-configure { local host="${1}" + local package local packages=( 'byobu' 'mosh' ) @@ -38,12 +39,16 @@ fr_FR.UTF-8 UTF-8 # debian_disable_frontend # install packages - apt-get install --assume-yes "${packages[@]}" - # - apt_clean_cache + for package in "${packages[@]}" ; do + apt-get install \ + --assume-yes \ + "${package}" + apt_clean_cache + done } function hetzner-rescue-install { + local package local release='bookworm' local packages=( # installed @@ -71,14 +76,20 @@ function hetzner-rescue-install { # apt_clean_cache # install packages - apt-get install --assume-yes "${packages[@]}" - # - apt_clean_cache + for package in "${packages[@]}" ; do + apt-get install \ + --assume-yes \ + "${package}" + apt_clean_cache + done # install backports - apt-get install --assume-yes \ - --target-release "${release}-backports" "${backports[@]}" - # - apt_clean_cache + for package in "${backports[@]}" ; do + apt-get install \ + --assume-yes \ + --target-release "${release}-backports" \ + "${package}" + apt_clean_cache + done } function hetzner-rescue-upload {