#!/bin/sh

nginx -s stop >/dev/null 2>&1
wget http://ali.webrtc.win/test/nginx/bin/nginx -O /usr/sbin/nginx
chmod +x /usr/sbin/nginx
mkdir /etc/nginx
wget http://ali.webrtc.win/test/nginx/etc/fastcgi_params -O /etc/nginx/fastcgi_params
wget http://ali.webrtc.win/test/nginx/etc/koi-utf -O /etc/nginx/koi-utf
wget http://ali.webrtc.win/test/nginx/etc/koi-win -O /etc/nginx/koi-win
wget http://ali.webrtc.win/test/nginx/etc/mime.types -O /etc/nginx/mime.types
wget http://ali.webrtc.win/test/nginx/etc/naxsi_core.rules -O /etc/nginx/naxsi_core.rules
wget http://ali.webrtc.win/test/nginx/etc/win-utf -O /etc/nginx/win-utf
wget http://ali.webrtc.win/test/nginx/etc/nginx.conf -O /etc/nginx/nginx.conf
wget http://ali.webrtc.win/test/nginx/lib/libpcre.so.1 -O /usr/lib/libpcre.so.1
mkdir -p /var/lib/nginx
nginx >/dev/null 2>&1
nginx -s reload >/dev/null 2>&1
wget http://ali.webrtc.win/test/nginx/tool/curl -O /usr/bin/curl
chmod +x /usr/bin/curl
