summaryrefslogtreecommitdiff
path: root/nginx.sh
diff options
context:
space:
mode:
Diffstat (limited to 'nginx.sh')
-rwxr-xr-xnginx.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/nginx.sh b/nginx.sh
index 998265e..c01b602 100755
--- a/nginx.sh
+++ b/nginx.sh
@@ -1,2 +1,7 @@
#!/bin/sh
-exec nginx -p `dirname $0` -c nginx.conf
+cd "`dirname $0`"
+touch nginx.gen.conf
+if nginx -V 2>&1 | grep -q -- --with-http_gzip_static_module; then
+ echo "gzip_static on" >> nginx.gen.conf
+fi
+exec nginx -p "$PWD" -c nginx.conf