configure

This commit is contained in:
Marc Beninca 2024-11-11 13:58:49 +01:00
parent d468491ae0
commit d2ce7a1b74
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

View file

@ -1,8 +1,9 @@
#! /usr/bin/env sh
ovh_rescue_configure() {
local host="${1}"
local hostname="${1}"
local release="bookworm"
local package
# apt / conf
printf "\
Acquire::AllowInsecureRepositories False;
@ -24,8 +25,9 @@ deb https://deb.debian.org/debian-security ${release}-security main non-free-fir
" >"/etc/apt/sources.list"
# bash / rc
main_link_bashrc
mv .bashrc .bashrc.old
# host name
hostname "${host}"
hostname "${hostname}"
# locales
printf "\
en_US.UTF-8 UTF-8
@ -35,20 +37,27 @@ fr_FR.UTF-8 UTF-8
locale-gen
# update catalog
apt-get update
#
# disable frontend
debian_disable_frontend
# install backports
apt-get install --assume-yes \
--target-release "${release}-backports" \
"tmux"
# clean cache
apt_clean_cache
set "tmux"
for package in "${@}"; do
echo ; echo "${package}"
apt-get install --assume-yes \
--target-release "${release}-backports" \
"${package}"
apt_clean_cache
done
# install packages
apt-get install --assume-yes \
"byobu" \
"mosh"
# clean cache
apt_clean_cache
set "apt-file" "mosh" "byobu"
for package in "${@}"; do
echo ; echo "${package}"
apt-get install --assume-yes \
"${package}"
apt_clean_cache
done
# update catalog
apt-get update
}
ovh_rescue_install() {