diff options
-rwxr-xr-x | install-itzks-workstation | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/install-itzks-workstation b/install-itzks-workstation index fa5f57b..95b1ac8 100755 --- a/install-itzks-workstation +++ b/install-itzks-workstation @@ -224,11 +224,13 @@ es mw101.intern heißen. [ENTER]' echo # Set hostname -read -p 'Wie lautet der Hostname (ohne Domain)? ' myhost +read -p 'Wie lautet der Hostname (ohne Domain, leer lassen, wenn Hostname des System nicht geändert werden muss)? ' myhost echo -hostnamectl set-hostname "$myhost" -export HOSTNAME="$myhost" +if [ -n "$(echo $myhost | xargs | cut -d" " -f1)" ]; then + hostnamectl set-hostname "$myhost" + export HOSTNAME="$myhost" +fi unset myhost # To be sure restart the following services |