Introduce URL for app. Plugins can override this.

fixes #242
This commit is contained in:
Alexander
2013-10-24 13:43:11 +02:00
parent c0a2683744
commit 85f14baad5
4 changed files with 18 additions and 18 deletions

View File

@@ -1,18 +1,2 @@
#!/bin/bash
set -e; case "$1" in
url)
if [[ -f "/home/git/$2/VHOST" ]]; then
echo "http://$(< "/home/git/$2/VHOST")"
else
cat
fi
;;
help) cat && cat<<EOF
url <app> Show the URL for an application
EOF
;;
esac
cat

View File

@@ -53,6 +53,8 @@ server {
}
}
EOF
echo "https://$hostname" > "$HOME/$APP/URL"
else
# default nginx.conf
cat<<EOF > $HOME/$APP/nginx.conf
@@ -73,8 +75,9 @@ server {
}
}
EOF
echo "http://$hostname" > "$HOME/$APP/URL"
fi
pluginhook nginx-pre-reload $APP
nc -U $HOME/reload-nginx
echo "$hostname" > "$HOME/$APP/VHOST"
fi