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