From 2953ed2486637754dfeb8eaa4c4439e572d225bb Mon Sep 17 00:00:00 2001 From: Jessica Frazelle Date: Mon, 14 Apr 2014 20:24:18 -0400 Subject: [PATCH] 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