aws-greengrass-provisioner icon indicating copy to clipboard operation
aws-greengrass-provisioner copied to clipboard

Modularize / Document template.sh.in

Open QuinnCiccoretti opened this issue 6 years ago • 1 comments
trafficstars

I'd like to add some custom scripts to set up devices. (specifically to install docker). Currently I put this code in template.sh.in, but it would be nice if I could separate it into a separate file.

  1. Does the provisioner zip the entire aws-greengrass-provisioner/src/main/resources/shell directory and transfer all the files over to the device?
  2. What environmental variables get written to these .in files? There seems to be env vars for all the scripts, and certificates, but it is unclear where they are set and how to add a new one. It would be pretty cool if I could do something similar to the start script in template:
if [ "$START" = true ]; then
    ./${START_SCRIPT}
fi

with my docker script:

if [ "$DOCKER" = true ]; then
    ./${DOCKER_INSTALL_SCRIPT}
fi

but I don't know how I'd go about this.

QuinnCiccoretti avatar Aug 09 '19 16:08 QuinnCiccoretti

Modularizing the installer script would definitely help some users that have specific configurations they want to consistently build. I'll look into this.

timmattison avatar Aug 09 '19 16:08 timmattison