Updating hostname change in the install.sh script

This commit is contained in:
Félix Aime 2021-01-13 22:16:44 +01:00
parent 69aede5bbe
commit e34d3aafde

View File

@ -4,6 +4,7 @@ ifaces=()
rfaces=() rfaces=()
CURRENT_USER="${SUDO_USER}" CURRENT_USER="${SUDO_USER}"
SCRIPT_PATH="$( cd "$(dirname "$0")" ; pwd -P )" SCRIPT_PATH="$( cd "$(dirname "$0")" ; pwd -P )"
HOST="$( hostname )"
welcome_screen() { welcome_screen() {
cat << "EOF" cat << "EOF"
@ -203,7 +204,7 @@ change_hostname() {
# Changing the hostname to tinycheck # Changing the hostname to tinycheck
echo -e "[+] Changing the hostname to tinycheck" echo -e "[+] Changing the hostname to tinycheck"
echo "tinycheck" > /etc/hostname echo "tinycheck" > /etc/hostname
sed -i 's/raspberrypi/tinycheck/g' /etc/hosts sed -i "s/$HOST/tinycheck/g" /etc/hosts
} }
install_package() { install_package() {