Environment variable $IOTEDGE_CONF needed instead of hard-coded path in scripts and executables
With respect to your declared environment variables (given in "./edgelet/iotedged/src/lib.rs", and "./edgelet/iotedge/src/main.rs"), they cover almost every aspect, except, an environment variable, which could replace the hard-coded path "-c /etc/iotedge/config.yaml" to something like "-c $IOTEDGE_CONF". The variable could either be set in scripts, or the iotedged service/daemon/manager, itself, with a default path, if its value is not already given by an argument or defined in an environment variable.
Hi Henrik, at this time we don’t plan on adding an environment variable to control this; however you may not be blocked.
This is already configurable in the `iotedged` executable via the `-c` option. The `iotedge check` has a `-c` option as well for setting this file location, because it reads the config file. (none of the other iotedge subcommands read the config file).
The only scripts related to this are in the packages and installer. However, the installer places this file in a very specific place and the executable needs to have a matching location. We actually don’t use the default anywhere. The linux packages directly specify the location: https://github.com/Azure/iotedge/blob/master/edgelet/contrib/systemd/iotedge.service#L8 And, the windows service directly specifies the location: https://github.com/Azure/iotedge/blob/master/edgelet/build/windows/iotedge.wm.xml#L60