I'm unable to run bash scripts in "runcmd:" that aren't inline.
runcmd: - [ bash, -c, echo "=========hello world=========" >>foo1.bar ] - [ bash, -c, echo "=========hello world=========" >>foo2.bar ] - [ bash, -c, /usr/local/bin/foo.sh ]
The first two lines are successfully run on the deployed Ubuntu instance. However, the foo.sh doesn't seem to run.
Here is /usr/local/bin/foo.sh:
#!/bin/bashecho "=========hello world=========" >>foosh.bar
foo.sh has executable permissions for root and resides on the MAAS server.
I've looked at the following but they don't seem to sort out my issue:
- Cannot make bash script work from cloud-init
- run GO111MODULE=on go install . ./cmd/... in cloud init
- https://gist.github.com/aw/40623531057636dd858a9bf0f67234e8
Any help or tips would be greatly appreciated.