1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2026-03-05 15:57:23 +01:00

mail seems to work

This commit is contained in:
Joshua Tauberer
2013-08-21 09:37:33 -04:00
parent d3a20b3369
commit eb47a1471b
11 changed files with 200 additions and 31 deletions

View File

@@ -1,18 +1,34 @@
export AMI=`curl http://cloud-images.ubuntu.com/locator/ec2/releasesTable | python3 tools/get_ubunut_ami.py us-east-1 13.04 amd64 instance-store`
ec2run $AMI -k mykey -t m1.small -z $AWS_AZ | tee instance.info
if [ -z "$EC2_KEYPAIR_NAME" ]; then
EC2_KEYPAIR_NAME=mykey
fi
UBUNTU_CONFIG="us-east-1 13.04 amd64 instance-store"
export AMI=`curl -s http://cloud-images.ubuntu.com/locator/ec2/releasesTable | python3 tools/get_ubuntu_ami.py $UBUNTU_CONFIG`
ec2-create-group -d "mailinabox" "mailinabox"
for PORT in 25 587 993; do ec2-authorize mailinabox -P tcp -p $PORT -s 0.0.0.0/0; done
ec2run $AMI -k $EC2_KEYPAIR_NAME -t m1.small -z $AWS_AZ -g mailinabox > instance.info
export INSTANCE=`cat instance.info | grep INSTANCE | awk {'print $2'}`
echo Started instance $INSTANCE
sleep 5
while [ 1 ]
do
export INSTANCE_IP=`ec2-describe-instances $INSTANCE | grep INSTANCE | awk {'print $14'}`
export INSTANCE_IP=`ec2-describe-instances $INSTANCE | grep INSTANCE | awk {'print $14'}`
if [ -z "$INSTANCE_IP" ]
then
echo "Waiting for $INSTANCE to start..."
else
exit
break
fi
sleep 6
done
echo New instance started: $INSTANCE_IP
# Give SSH time to start.
sleep 5
echo New instance has IP: $INSTANCE_IP