This was tested on:
- Ubuntu 14.04 x64
- Ubuntu 16.04 x64
# Check if this is the very first time that this script is running | |
if ([ ! -f /root/.not-a-new-instance.txt ]) then | |
newEC2Instance=true | |
fi | |
if ([ $newEC2Instance ]) then | |
whoami | |
cd /tmp |
# Sidekiq interaction and startup script | |
commands: | |
create_post_dir: | |
command: "mkdir -p /opt/elasticbeanstalk/hooks/appdeploy/post" | |
ignoreErrors: true | |
files: | |
"/opt/elasticbeanstalk/hooks/appdeploy/post/50_restart_sidekiq.sh": | |
mode: "000755" | |
owner: root | |
group: root |