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

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