fix verify_app_name to bomb on null app. use it in nginx:build-config

This commit is contained in:
Michael Hobbs
2015-04-21 10:58:11 -07:00
parent a8f08bd5a8
commit 661b6706de
2 changed files with 2 additions and 0 deletions

View File

@@ -104,6 +104,7 @@ dokku_container_log_verbose_quiet() {
verify_app_name() {
local APP="$1"
[[ ! -n "$APP" ]] && dokku_log_fail "(verify_app_name) APP must not be null"
[[ ! -d "$DOKKU_ROOT/$APP" ]] && dokku_log_fail "App $APP does not exist"
IMAGE="dokku/$APP"
return 0

View File

@@ -28,6 +28,7 @@ restart_nginx () {
case "$1" in
nginx:build-config)
APP="$2"; DOKKU_APP_LISTEN_PORT="$3"; DOKKU_APP_LISTEN_IP="${4}"
verify_app_name "$APP"
VHOST_PATH="$DOKKU_ROOT/$APP/VHOST"
URLS_PATH="$DOKKU_ROOT/$APP/URLS"
WILDCARD_SSL="$DOKKU_ROOT/tls"