Browse Source

Merge branch 'next' of github.com:rtCamp/easyengine into next

old-stable
gau1991 10 years ago
parent
commit
d56657af1c
  1. 5
      src/lib/ee_lib_mysql_info.sh
  2. 5
      src/lib/ee_lib_nginx_info.sh
  3. 6
      src/lib/ee_lib_php_info.sh
  4. 5
      src/modules/stack/install/ee_mod_setup_mysql.sh

5
src/lib/ee_lib_mysql_info.sh

@ -2,6 +2,8 @@
function ee_lib_mysql_info() function ee_lib_mysql_info()
{ {
mysqladmin ping &>> $EE_COMMAND_LOG
if [ $? -ne 0 ]; then
local ee_mysql_version=$(mysql -V | awk '{print($5)}' | cut -d ',' -f1) local ee_mysql_version=$(mysql -V | awk '{print($5)}' | cut -d ',' -f1)
local ee_mysql_port=$(mysql -e "show variables" | grep ^port | awk '{print($2)}') local ee_mysql_port=$(mysql -e "show variables" | grep ^port | awk '{print($2)}')
local ee_mysql_socket=$(mysql -e "show variables" | grep "^socket" | awk '{print($2)}') local ee_mysql_socket=$(mysql -e "show variables" | grep "^socket" | awk '{print($2)}')
@ -19,4 +21,7 @@ function ee_lib_mysql_info()
ee_lib_echo_escape "max_used_connections\t\t \033[37m$ee_mysql_max_used_connections/$ee_mysql_max_connections" ee_lib_echo_escape "max_used_connections\t\t \033[37m$ee_mysql_max_used_connections/$ee_mysql_max_connections"
ee_lib_echo_escape "datadir\t\t\t\t \033[37m$ee_mysql_data_dir" ee_lib_echo_escape "datadir\t\t\t\t \033[37m$ee_mysql_data_dir"
ee_lib_echo_escape "socket\t\t\t\t \033[37m$ee_mysql_socket" ee_lib_echo_escape "socket\t\t\t\t \033[37m$ee_mysql_socket"
else
ee_lib_echo "MYSQL not installed"
fi
} }

5
src/lib/ee_lib_nginx_info.sh

@ -2,6 +2,8 @@
function ee_lib_nginx_info() function ee_lib_nginx_info()
{ {
ee_lib_package_check $EE_NGINX_PACKAGE
if [ "$EE_PACKAGE_NAME" != "" ]; then
local ee_nginx_version=$(nginx -v 2>&1 | cut -d':' -f2 | cut -d' ' -f2 | cut -d'/' -f2) local ee_nginx_version=$(nginx -v 2>&1 | cut -d':' -f2 | cut -d' ' -f2 | cut -d'/' -f2)
local ee_nginx_user=$(grep ^user /etc/nginx/nginx.conf | cut -d' ' -f2 | cut -d';' -f1) local ee_nginx_user=$(grep ^user /etc/nginx/nginx.conf | cut -d' ' -f2 | cut -d';' -f1)
local ee_nginx_processes=$(grep worker_processes /etc/nginx/nginx.conf | cut -d' ' -f2 | cut -d';' -f1) local ee_nginx_processes=$(grep worker_processes /etc/nginx/nginx.conf | cut -d' ' -f2 | cut -d';' -f1)
@ -21,4 +23,7 @@ function ee_lib_nginx_info()
ee_lib_echo_escape "fastcgi_read_timeout\t\t \033[37m$ee_fastcgi_timeout" ee_lib_echo_escape "fastcgi_read_timeout\t\t \033[37m$ee_fastcgi_timeout"
ee_lib_echo_escape "client_max_body_size\t\t \033[37m$ee_clinet_max_body_size" ee_lib_echo_escape "client_max_body_size\t\t \033[37m$ee_clinet_max_body_size"
ee_lib_echo_escape "allow\t\t\t\t \033[37m$ee_nginx_allowed_ip_add" ee_lib_echo_escape "allow\t\t\t\t \033[37m$ee_nginx_allowed_ip_add"
else
ee_lib_echo "NGINX not installed"
fi
} }

6
src/lib/ee_lib_php_info.sh

@ -1,6 +1,8 @@
# PHP information # PHP information
function ee_lib_php_info() function ee_lib_php_info()
{ {
ee_lib_package_check php5-fpm
if [ "$EE_PACKAGE_NAME" != "" ]; then
#Collect information from php.ini #Collect information from php.ini
local ee_php_version=$(php -v | head -n1 | cut -d' ' -f2 | cut -d'+' -f1) local ee_php_version=$(php -v | head -n1 | cut -d' ' -f2 | cut -d'+' -f1)
local ee_php_memory=$(grep ^memory_limit /etc/php5/fpm/php.ini | awk '{print $3}') local ee_php_memory=$(grep ^memory_limit /etc/php5/fpm/php.ini | awk '{print $3}')
@ -48,5 +50,7 @@ function ee_lib_php_info()
ee_lib_echo_escape "xdebug.profiler_enable_trigger\t \033[37m$ee_xdebug_check" ee_lib_echo_escape "xdebug.profiler_enable_trigger\t \033[37m$ee_xdebug_check"
ee_lib_echo_escape "listen\t\t\t\t \033[37m$ee_php_listen" ee_lib_echo_escape "listen\t\t\t\t \033[37m$ee_php_listen"
done done
else
ee_lib_echo "PHP not installed"
fi
} }

5
src/modules/stack/install/ee_mod_setup_mysql.sh

@ -5,8 +5,7 @@ function ee_mod_setup_mysql()
ee_lib_echo "Setting up Percona MySQL, please wait..." ee_lib_echo "Setting up Percona MySQL, please wait..."
# Setting wait_timeout = 30 & interactive_timeout = 60 # Setting wait_timeout = 30 & interactive_timeout = 60
grep "_timeout" /etc/mysql/my.cnf &>> $EE_COMMAND_LOG if [ ! -f /etc/mysql/my.cnf ]; then
if [ $? -ne 0 ]; then echo -e "[mysqld] \nwait_timeout = 30 \ninteractive_timeout = 60" &>> /etc/mysql/my.cnf
sed -i "/#max_connections/a wait_timeout = 30 \ninteractive_timeout = 60" /etc/mysql/my.cnf
fi fi
} }

Loading…
Cancel
Save