From e34d3aafde5712f06e6451d4a9f045b9ffe4048d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Aime?= Date: Wed, 13 Jan 2021 22:16:44 +0100 Subject: [PATCH] Updating hostname change in the install.sh script --- install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index a40344a..f3bfe38 100644 --- a/install.sh +++ b/install.sh @@ -4,6 +4,7 @@ ifaces=() rfaces=() CURRENT_USER="${SUDO_USER}" SCRIPT_PATH="$( cd "$(dirname "$0")" ; pwd -P )" +HOST="$( hostname )" welcome_screen() { cat << "EOF" @@ -203,7 +204,7 @@ change_hostname() { # Changing the hostname to tinycheck echo -e "[+] Changing the hostname to tinycheck" echo "tinycheck" > /etc/hostname - sed -i 's/raspberrypi/tinycheck/g' /etc/hosts + sed -i "s/$HOST/tinycheck/g" /etc/hosts } install_package() {