diff --git a/setup.sh b/setup.sh index 4ee6a8d..978cbef 100755 --- a/setup.sh +++ b/setup.sh @@ -280,6 +280,11 @@ prepare_hostname() { return else hostname=$(hostname) + # If hostname_file doesn't exist let's also put the hostname in there + if [ ! -f "$hostname_file" ]; then + echo "$hostname" > "$hostname_file" || die "Failed to save hostname" + fi + log_warning "No hostname provided. Defaulting to the currently set hostname on the system. ($hostname)" return fi