Skip to content
This repository has been archived by the owner on Apr 5, 2024. It is now read-only.

run.sh fails to change the hostname #8

Open
grokbeer opened this issue Jan 16, 2022 · 0 comments
Open

run.sh fails to change the hostname #8

grokbeer opened this issue Jan 16, 2022 · 0 comments

Comments

@grokbeer
Copy link

Line 5-6 of run.sh shows the following command is attempted:

# try and set the hostname to 'balena'
curl -X -s PATCH --header "Content-Type:application/json" --data '{"network": {"hostname": "balena"}}' "$BALENA_SUPERVISOR_ADDRESS/v1/device/host-config?apikey=$BALENA_SUPERVISOR_API_KEY" > /dev/null

This doesn't work and instead gives the following error:

curl: (6) Could not resolve host: PATCH

The issue is caused by the "-s" option following the "-X". If the order of these arguments is swapped then the command would run successfully.

But why do you want to change the hostname to begin with?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant