Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/bin/bash --login
set -e # Exit if anything fails
pushd `dirname $0`/..
STACK=`pwd`
if ! [ -d "${STACK}/nginx/nginx-1.0.6" ]; then
pushd nginx && tar xzf 'nginx-1.0.6.tar.gz' && popd
fi
if ! [ -d "${STACK}/nginx/nginx_upload_module-2.2.0" ]; then
pushd nginx && tar xzf "nginx_upload_module-2.2.0.tar.gz" && popd
fi
if ! [ -d "${STACK}/nginx/masterzen-nginx-upload-progress-module-8b55a34" ]; then
pushd nginx && tar xzf "masterzen-nginx-upload-progress-module-v0.8.2-0-g8b55a34.tar.gz" && popd
fi
test -f /opt/nginx/logs/nginx.pid && sudo /opt/nginx/sbin/nginx -s stop
test -f /opt/nginx && sudo rm -r /opt/nginx
sudo mkdir -p /opt/nginx
sudo chown -R ${USER} /opt/nginx
./bin/passenger-install-nginx-module --auto \
--prefix=/opt/nginx \
--nginx-source-dir=${STACK}/nginx/nginx-1.0.6 \
--extra-configure-flags="--with-http_ssl_module --with-http_gzip_static_module --add-module=${STACK}/nginx/nginx_upload_module-2.2.0 --add-module=${STACK}/nginx/masterzen-nginx-upload-progress-module-8b55a34"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment