From 26058e12f776ae0bcd0fa56f284592b1ba44b406 Mon Sep 17 00:00:00 2001 From: Tim Eertmoed Date: Mon, 28 Oct 2024 14:06:16 +0100 Subject: [PATCH] usr/bin/custom/hostname aktualisiert --- usr/bin/custom/hostname | 3 +++ 1 file changed, 3 insertions(+) diff --git a/usr/bin/custom/hostname b/usr/bin/custom/hostname index 768edcd..fec09f9 100644 --- a/usr/bin/custom/hostname +++ b/usr/bin/custom/hostname @@ -20,6 +20,9 @@ update_hosts() { hostname=$(get_hostname) if [ -n "$hostname" ]; then + # Set the hostname using hostnamectl + sudo hostnamectl set-hostname "$hostname" + echo "Set hostname to: $hostname" >> $LOGFILE update_hosts "$hostname" else echo "No hostname found." >> $LOGFILE