CLOUD-32 update ec2-init.sh to handle restart