# this runs user scripts found in user-data, that are # stored in /var/lib/cloud/scripts by the initial ec2init upstart job description "execute cloud user scripts" start on stopped rc RUNLEVEL=[2345] console output task script sdir=/var/lib/cloud/data/scripts [ -d "$sdir" ] || exit 0 exec cloud-init-run-module once_per_ami user-scripts execute run-parts "$sdir" end script