Load Environment Variables
To make environment variables on your IoT device reachable by the JFrog Connect Agent, you can load a file to the agent’s service configuration. This page describes the procedure.
The JFrog Connect Agent runs as a systemd service. Therefore, system environment variables are not reachable by the agent and cannot be used with Connect tools such as Remote Commands.
To make the environment variables reachable by the Connect Agent, you can load a file containing the variables to the agent’s service configuration. Once the file is loaded, you can use environment variables in Connect tools.
To load your environment variables to the Connect Agent, do the following:
Create the file:
/etc/environment
Place your environment variables at the end of the file. For example:
Open the file
/etc/systemd/system/connect.service
, and right above the line that begins withExecStart
, enter the line:
Save and close the file. Execute the command:
Execute the command:
Once you have completed the steps above, any environment variable written inside the file /etc/environment
, will be accessible from Connect tools.
File Modifications
If you modify the file /etc/environment
, you will need to restart the Connect service for the changes to take effect. This includes adding, deleting or changing variables, and changing any values of the variables.
Last updated