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

This commit is contained in:
Michael Hobbs committed 2015-04-21 10:58:11 -07:00
1 parent a8f08bd5a8
commit 661b6706de
2 files changed
+2

No files matched your search

+1
View File
@@ -104,6 +104,7 @@ dokku_container_log_verbose_quiet() {
verify_app_name() { verify_app_name() {
local APP="$1" 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" [[ ! -d "$DOKKU_ROOT/$APP" ]] && dokku_log_fail "App $APP does not exist"
IMAGE="dokku/$APP" IMAGE="dokku/$APP"
return 0 return 0
+1
View File
@@ -28,6 +28,7 @@ restart_nginx () {
case "$1" in case "$1" in
nginx:build-config) nginx:build-config)
APP="$2"; DOKKU_APP_LISTEN_PORT="$3"; DOKKU_APP_LISTEN_IP="${4}" APP="$2"; DOKKU_APP_LISTEN_PORT="$3"; DOKKU_APP_LISTEN_IP="${4}"
verify_app_name "$APP"
VHOST_PATH="$DOKKU_ROOT/$APP/VHOST" VHOST_PATH="$DOKKU_ROOT/$APP/VHOST"
URLS_PATH="$DOKKU_ROOT/$APP/URLS" URLS_PATH="$DOKKU_ROOT/$APP/URLS"
WILDCARD_SSL="$DOKKU_ROOT/tls" WILDCARD_SSL="$DOKKU_ROOT/tls"