From 50194e59237425cadfe64efb19c06d0b9fd9b757 Mon Sep 17 00:00:00 2001 From: Michael Hobbs Date: Thu, 7 Jan 2016 07:43:08 -0800 Subject: [PATCH] don't build nginx config if the app has not been deployed. closes #1806 --- plugins/nginx-vhosts/functions | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/plugins/nginx-vhosts/functions b/plugins/nginx-vhosts/functions index 13902bfc5..b0804f1e8 100755 --- a/plugins/nginx-vhosts/functions +++ b/plugins/nginx-vhosts/functions @@ -235,8 +235,13 @@ EOF echo "}" >> $NGINX_CONF fi - dokku_log_info1 "Creating $SCHEME nginx.conf" - mv $NGINX_CONF "$DOKKU_ROOT/$APP/nginx.conf" + if is_deployed "$APP"; then + dokku_log_info1 "Creating $SCHEME nginx.conf" + mv $NGINX_CONF "$DOKKU_ROOT/$APP/nginx.conf" + else + dokku_log_info1 "App $APP has not been deployed. Skipping nginx config creation" + rm -f $NGINX_CONF + fi if is_deployed "$APP"; then dokku_log_info1 "Running nginx-pre-reload"