Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Ability to Set Hostname in CLI When Uploading Files #67

Open
liv3dn8as opened this issue Apr 5, 2017 · 2 comments
Open

Add Ability to Set Hostname in CLI When Uploading Files #67

liv3dn8as opened this issue Apr 5, 2017 · 2 comments

Comments

@liv3dn8as
Copy link

I think that it would be nice to be able to set the hostname at time of uploading. Having some sort of argument like --hostname would be nice. However, I just realized that when setting the hostname it doesn't stick after the device has been rebooted. Only if it is in the actual code. Not sure if it even makes sense then as I doubt you could really append the actual code. Maybe my idea will spark something though!

@saintcrawler
Copy link
Contributor

You can write the hostname in a separate file and then execute it from init.lua. Like in this example (see the very first lines). Then, you just re-uploads that separate file with nodemcu-uploader.

@liv3dn8as
Copy link
Author

Thanks for the example and yes, that is a possibility but I would still have to have a file for every hostname I wanted to use. My main objective is, for example. Say someone is trying to create a Mesh Network and the configuration files are all the same. Wouldn't it be super simple to just type the wanted hostname while uploading the files to each ESP? I did manage to use 'echo' and append to the init.lua file. Which will have to do for now!

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

No branches or pull requests

3 participants