In my start script for a container, I am grabbing some system data, echoing to /etc/profile.d/gateway-rs.sh and then exporting the environment variables with source that are then used for the gateway:
This works for the container, however these are then not available in the web-based shell on balenaCloud.
Where does balenaOS store it’s environment variables? And can I add to them and reload them at runtime without doing so from the balenaCloud device/fleet variables?
Or is there a better way to do this using the supervisor API or some other method I haven’t thought of?
are you running this script in the web terminal on “Host OS” ? or inside a container ?
if it’s in a service container it should work as long as the environment variable is defined globaly or for this service. If it’s in the Host OS you’ll have to figure another way to get those, like @gelbal said