@@ -1,6 +1,7 @@
|
||||
#!/bin/bash
|
||||
Cpunum=`cat /proc/cpuinfo |grep 'processor'|wc -l`;
|
||||
nginx_configure=`/usr/local/nginx/sbin/nginx -V 2> /tmp/nginx_configure && cat /tmp/nginx_configure | grep 'configure arguments' | cut -d: -f2 && rm -f /tmp/nginx_configure`;
|
||||
nginx_configure='--prefix=/usr/local/nginx --user=www --group=www --with-http_ssl_module --with-http_gzip_static_module --without-mail_pop3_module --without-mail_imap_module --without-mail_smtp_module --without-http_uwsgi_module --without-http_scgi_module --with-ipv6';
|
||||
[ -f /usr/local/nginx/sbin/nginx ] && nginx_configure=`/usr/local/nginx/sbin/nginx -V 2> /tmp/nginx_configure && cat /tmp/nginx_configure | grep 'configure arguments' | cut -d: -f2 && rm -f /tmp/nginx_configure`;
|
||||
new_nginx_configure=$nginx_configure;
|
||||
if ! echo "$new_nginx_configure" | grep 'with-http_stub_status_module' > /dev/null; then
|
||||
new_nginx_configure="${new_nginx_configure} --with-http_stub_status_module";
|
||||
@@ -12,7 +13,8 @@ if ! echo "$new_nginx_configure" | grep 'ngx_http_upstream_check_module' > /dev/
|
||||
new_nginx_configure="${new_nginx_configure} --add-module=modules/ngx_http_upstream_check_module";
|
||||
fi;
|
||||
|
||||
nginx_version=`/usr/local/nginx/sbin/nginx -v 2> /tmp/nginx_version && cat /tmp/nginx_version | grep 'Tengine' && rm -f /tmp/nginx_version`;
|
||||
nginx_version='';
|
||||
[ -f /usr/local/nginx/sbin/nginx ] && nginx_version=`/usr/local/nginx/sbin/nginx -v 2> /tmp/nginx_version && cat /tmp/nginx_version && rm -f /tmp/nginx_version`;
|
||||
echo $nginx_version;
|
||||
|
||||
if [ "$nginx_version" != "Tengine version: Tengine/2.3.2" ]; then
|
||||
@@ -36,4 +38,4 @@ if [ "$nginx_version" != "Tengine version: Tengine/2.3.2" ]; then
|
||||
fi;
|
||||
|
||||
nginx -v
|
||||
echo 'AMH Tengine Update Done'
|
||||
echo 'AMH Tengine Update successful'
|
||||
Reference in New Issue
Block a user