From 2953ed2486637754dfeb8eaa4c4439e572d225bb Mon Sep 17 00:00:00 2001 From: Jessica Frazelle Date: Mon, 14 Apr 2014 20:24:18 -0400 Subject: [PATCH 1/2] if dokku.conf has not been created, create it --- plugins/nginx-vhosts/install | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/nginx-vhosts/install b/plugins/nginx-vhosts/install index d21bdeac5..1bbe8284f 100755 --- a/plugins/nginx-vhosts/install +++ b/plugins/nginx-vhosts/install @@ -14,7 +14,9 @@ if ! grep -q dokku-nginx-reload "/etc/sudoers"; then rm /tmp/sudoers.new fi -cat< /etc/nginx/conf.d/dokku.conf +# if dokku.conf has not been created, create it +if [ ! -f /etc/nginx/conf.d/dokku.conf ]; then + cat< /etc/nginx/conf.d/dokku.conf include $DOKKU_ROOT/*/nginx.conf; ssl_session_cache shared:SSL:20m; @@ -27,6 +29,7 @@ ssl_prefer_server_ciphers on; #ssl_certificate $DOKKU_ROOT/tls/server.crt; #ssl_certificate_key $DOKKU_ROOT/tls/server.key; EOF +fi sed -i 's/# server_names_hash_bucket_size/server_names_hash_bucket_size/' /etc/nginx/nginx.conf if [[ ! -f "$DOKKU_ROOT/VHOST" ]]; then From 969aed87c6438db88698cfea656f2d296854bf2c Mon Sep 17 00:00:00 2001 From: Jessica Frazelle Date: Tue, 15 Apr 2014 09:31:08 -0400 Subject: [PATCH 2/2] double brackets --- plugins/nginx-vhosts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/nginx-vhosts/install b/plugins/nginx-vhosts/install index 1bbe8284f..c7156477f 100755 --- a/plugins/nginx-vhosts/install +++ b/plugins/nginx-vhosts/install @@ -15,7 +15,7 @@ if ! grep -q dokku-nginx-reload "/etc/sudoers"; then fi # if dokku.conf has not been created, create it -if [ ! -f /etc/nginx/conf.d/dokku.conf ]; then +if [[ ! -f /etc/nginx/conf.d/dokku.conf ]]; then cat< /etc/nginx/conf.d/dokku.conf include $DOKKU_ROOT/*/nginx.conf;