From 997d2dd09ce5982ca86171de80856a6107c87f9e Mon Sep 17 00:00:00 2001 From: Jeff Lindsay Date: Sun, 30 Jun 2013 12:02:52 -0500 Subject: [PATCH] only override url if vhost file exists --- dokku | 1 - plugins/nginx-vhosts/commands | 6 +++++- tests/run_ec2 | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/dokku b/dokku index 6dd103737..bff2b2519 100755 --- a/dokku +++ b/dokku @@ -34,7 +34,6 @@ case "$1" in port=$(docker port $id 5000) echo $port > "$HOME/$APP/PORT" echo "$(< "$HOME/HOSTNAME"):$port" > "$HOME/$APP/ADDRESS" - else # Regular deploy oldid=$(< "$HOME/$APP/CONTAINER") diff --git a/plugins/nginx-vhosts/commands b/plugins/nginx-vhosts/commands index 2bd3eb52b..6c958587e 100755 --- a/plugins/nginx-vhosts/commands +++ b/plugins/nginx-vhosts/commands @@ -2,7 +2,11 @@ set -e; case "$1" in url) - echo "http://$(< "/home/git/$2/VHOST")" + if [[ -f "/home/git/$2/VHOST" ]]; then + echo "http://$(< "/home/git/$2/VHOST")" + else + cat + fi ;; esac \ No newline at end of file diff --git a/tests/run_ec2 b/tests/run_ec2 index dd302817d..025000cee 100755 --- a/tests/run_ec2 +++ b/tests/run_ec2 @@ -1,4 +1,5 @@ #!/bin/bash +set -e KEYNAME="$1" indent() { sed "s/^/ /"; } echo "-----> Booting EC2 instance..."