only override url if vhost file exists

This commit is contained in:
Jeff Lindsay
2013-06-30 12:02:52 -05:00
parent 071c446315
commit 997d2dd09c
3 changed files with 6 additions and 2 deletions

1
dokku
View File

@@ -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")

View File

@@ -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

View File

@@ -1,4 +1,5 @@
#!/bin/bash
set -e
KEYNAME="$1"
indent() { sed "s/^/ /"; }
echo "-----> Booting EC2 instance..."