Sha256: 65baf97c32c900cad8a440993efcce8c0461411f2adcd8d8acfe5988b5742587

Contents?: true

Size: 1.09 KB

Versions: 4

Compression:

Stored size: 1.09 KB

Contents

#! /bin/bash

set -e
trap ERROR ERR

BIN_PATH=<%= nginx_bin_path %>
CONF_PATH=<%= nginx_conf_path %>
PID_PATH=<%= nginx_pid_path %>
ERROR_LOG_PATH=/var/log/nginx_master_error.log
LOCK_PATH=/var/lock/nginx
PREFIX_PATH=<%= nginx_prefix_path %>

cd /tmp/nginx

wget -nv http://sysoev.ru/nginx/nginx-0.5.35.tar.gz

tar zxpf nginx-0.5.35.tar.gz

cd nginx-0.5.35
echo "Configuring nginx..."
./configure --sbin-path=$BIN_PATH --conf-path=$CONF_PATH --pid-path=$PID_PATH --error-log-path=$ERROR_LOG_PATH --lock-path=$LOCK_PATH --prefix=$PREFIX_PATH --with-md5=auto/lib/md5 --with-sha1=auto/lib/sha1 --with-http_ssl_module > configure.log
echo "Compiling nginx..."
make > make.log
echo "Installing nginx"
make install > make_install.log

cd ..
rm -rf nginx-0.5.35*

install -o root /tmp/nginx.initd /etc/init.d/nginx
rm -f /tmp/nginx.initd

/sbin/chkconfig --level 345 nginx on

mkdir -p /etc/nginx/vhosts

echo "# Blank nginx conf; work-around for nginx conf include issue" > /etc/nginx/vhosts/blank.conf
   
install -o root -m 644 /tmp/nginx.conf $CONF_PATH
rm -f /tmp/nginx.conf

id nginx || /usr/sbin/adduser -r nginx

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
capigen-0.1.2 lib/templates/nginx/install.sh.erb
capigen-0.1.3 lib/templates/nginx/install.sh.erb
capigen-0.1.4 lib/templates/nginx/install.sh.erb
capigen-0.1.1 templates/nginx/install.sh.erb