mirror of
https://github.com/farcasclaudiu/terraform-course.git
synced 2026-06-22 07:01:56 +03:00
add code to make sure instance is ready
This commit is contained in:
@@ -1,3 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
# sleep until instance is ready
|
||||
until [[ -f /var/lib/cloud/instance/boot-finished ]]; do
|
||||
sleep 1
|
||||
done
|
||||
|
||||
# install nginx
|
||||
apt-get update
|
||||
apt-get -y install nginx
|
||||
|
||||
# make sure nginx is started
|
||||
service nginx start
|
||||
|
||||
Reference in New Issue
Block a user