feat: save hostname to file if it doesn't already exist
Some checks failed
Nix Format Check / check-format (push) Failing after 37s
Some checks failed
Nix Format Check / check-format (push) Failing after 37s
This commit is contained in:
parent
5aada55fd3
commit
7fd533f056
5
setup.sh
5
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user