Hi @Anonymous Thank you for providing additional information. Script Handler extension of Azure IoT hub device update is used to prepare and execute a script on the IoT Device. At runtime, the Script Handler will download every file listed in files
array, into a workfolder
. This is a folder used for storing downloaded file, workflow result file, and any other temp files. The workfolder
path is automatically injected to the scripts during run time and it has a path as follows /var/lib/adu/downloads/workflow_id_1234567890/
To provide a custom download path, we can use the argument work-folder
under handlerProperties.arguments
setting of the Update manifest file to set a custom path. Please refer the following example which displays the arguments for more details.
{
"description": "Motors Update post-install step",
"handler": "microsoft/script:1",
"files": [
"contoso-motor-installscript.sh"
],
"handlerProperties": {
"scriptFileName": "contoso-motor-installscript.sh",
"arguments": "--post-install-sim-success --component-name --component-name-val --component-group --component-group-val --component-prop path --component-prop-val path --work-folder path",
"installedCriteria": "1.2"
}
}
Please refer to the Readme file of the script handler for more details on this.
Hope this answers your question. Please let us know if you have any additional questions or need further clarification on this.
If the response helped, please do click Accept Answer and Yes. Doing so would help other community members with similar issue identify the solution. I highly appreciate your contribution to the community.