@@ -35,7 +35,7 @@ function ee_lib_git()
3535 for ee_git_dir in ${@: 1: $(($# -1))} ; do
3636 if [ -d $ee_git_dir ]; then
3737 # Change directory
38- cd $ee_git_dir
38+ cd $ee_git_dir
3939
4040 # Check .git
4141 if [ ! -d .git ]; then
@@ -94,7 +94,7 @@ if [[ $EE_CURRENT_VERSION < $EE_LATEST_VERSION ]]; then
9494 # Git backup
9595 ee_lib_git /etc/nginx/ /etc/php5/ /etc/mysql/ /etc/postfix " EasyEngine version $EE_CURRENT_VERSION "
9696
97- # Remove old version of EasyEngine (ee)
97+ # Remove old version of EasyEngine (ee)
9898 rm -rf /tmp/easyengine & >> /dev/null
9999
100100 # Let's clone EasyEngine (ee)
@@ -130,7 +130,7 @@ if [[ $EE_CURRENT_VERSION < $EE_LATEST_VERSION ]]; then
130130 || ee_lib_error " Unable to copy NGINX sample files, exit status = " $?
131131
132132 # NGINX Setup
133- sed -i " s/X-Powered-By.*/X-Powered-By \" EasyEngine $EE_LATEST_VERSION \" ;/" /etc/nginx/nginx.conf
133+ sed -i " s/X-Powered-By.*/X-Powered-By \" EasyEngine $EE_LATEST_VERSION \" ;/" /etc/nginx/nginx.conf
134134 rsync -avz --exclude acl.conf /usr/share/easyengine/nginx/common/* /etc/nginx/common/ & >> $EE_UPDATE_LOG \
135135 || ee_lib_error " Unable to rsync NGINX common files, exit status = " $?
136136
@@ -167,7 +167,7 @@ if [[ $EE_CURRENT_VERSION < $EE_LATEST_VERSION ]]; then
167167 for ee_include in $( find /usr/local/lib/easyengine/ -iname " *.sh" ) ; do
168168 source $ee_include
169169 done
170-
170+
171171 # Avoid re-source and readonly errors
172172 ee_source=1
173173
@@ -222,7 +222,7 @@ if [[ $EE_CURRENT_VERSION < $EE_LATEST_VERSION ]]; then
222222
223223 # NGINX common
224224 if [[ $EE_CURRENT_VERSION = 1.0.0 ]] || [[ $EE_CURRENT_VERSION = 1.0.1 ]] || [[ $EE_CURRENT_VERSION = 1.1.0 ]]; then
225- # Move allowed_ip.conf to acl.conf
225+ # Move allowed_ip.conf to acl.conf
226226 (sed " /allow/,+2d" /usr/share/easyengine/nginx/common/acl.conf; grep -v ^# /etc/nginx/common/allowed_ip.conf ) > /etc/nginx/common/acl.conf
227227 sed -i ' /allow ;/d' /etc/nginx/common/acl.conf
228228
@@ -252,7 +252,7 @@ if [[ $EE_CURRENT_VERSION < $EE_LATEST_VERSION ]]; then
252252 sed -i " /worker_processes/a \worker_rlimit_nofile 100000;" /etc/nginx/nginx.conf
253253 sed -i " s/# multi_accept/multi_accept/" /etc/nginx/nginx.conf
254254 sed -i " s/keepalive_timeout.*/keepalive_timeout 30;/" /etc/nginx/nginx.conf
255-
255+
256256 # Setup port 22222
257257 cp -av /usr/share/easyengine/nginx/22222 /etc/nginx/sites-available/ & >> $EE_UPDATE_LOG
258258 if [ " $EE_LINUX_DISTRO " == " Debian" ]; then
@@ -277,7 +277,7 @@ if [[ $EE_CURRENT_VERSION < $EE_LATEST_VERSION ]]; then
277277 if [ ! -d /var/www/22222/cert ]; then
278278 mkdir /var/www/22222/cert
279279 fi
280-
280+
281281 # Generate SSL key
282282 ee_lib_echo " Generating SSL private key"
283283 openssl genrsa -out /var/www/22222/cert/22222.key 2048 & >> $EE_UPDATE_LOG \
@@ -326,13 +326,13 @@ if [[ $EE_CURRENT_VERSION < $EE_LATEST_VERSION ]]; then
326326
327327 sed -i " s'listen = 127.0.0.1:9000'listen = 127.0.0.1:9001'" /etc/php5/fpm/pool.d/debug.conf \
328328 || ee_lib_error " Unable to change listen = 127.0.0.1:9001 for debug pool, exit status = " $?
329-
329+
330330 sed -i " s';slowlog.*'slowlog = /var/log/php5/slow.log'" /etc/php5/fpm/pool.d/debug.conf \
331331 || ee_lib_error " Unable to change slowlog settings for debug pool, exit status = " $?
332332
333333 sed -i " s';request_slowlog_timeout.*'request_slowlog_timeout = 10s'" /etc/php5/fpm/pool.d/debug.conf \
334334 || ee_lib_error " Unable to change request_slowlog_timeout for debug pool, exit status = " $?
335-
335+
336336 echo -e " php_admin_value[xdebug.profiler_output_dir] = /tmp/ \nphp_admin_value[xdebug.profiler_output_name] = cachegrind.out.%p-%H-%R \nphp_admin_flag[xdebug.profiler_enable_trigger] = on \nphp_admin_flag[xdebug.profiler_enable] = off" | tee -ai /etc/php5/fpm/pool.d/debug.conf & >> $EE_UPDATE_LOG \
337337 || ee_lib_error " Unable to add xdebug settings for debug pool, exit status = " $?
338338 fi
@@ -440,21 +440,21 @@ if [[ $EE_CURRENT_VERSION < $EE_LATEST_VERSION ]]; then
440440 fi
441441
442442 if [[ $EE_CURRENT_VERSION = 2.1.0 ]]; then
443-
443+
444444 # Change permission of EasyEngine log folder
445445 chmod -R 700 /var/log/easyengine \
446446 || ee_lib_error " Unable to change permissions for EasyEngine log folder, exit status = " $?
447447
448448 # RAM based optimization settings
449449 ee_lib_ram
450-
450+
451451 if [ -f /etc/php5/fpm/pool.d/www.conf ]; then
452452 sed -i " s/pm.max_children = .*/pm.max_children = ${EE_PHP_MAX_CHILDREN} /" /etc/php5/fpm/pool.d/www.conf
453453 fi
454454
455455 # Setup Zend OpCache as per RAM
456456 if [ -f /etc/php5/fpm/conf.d/05-opcache.ini ]; then
457- grep memory_consumption /etc/php5/fpm/conf.d/05-opcache.ini & > /dev/null
457+ grep memory_consumption /etc/php5/fpm/conf.d/05-opcache.ini & > /dev/null
458458 if [ $? -ne 0 ]; then
459459 sed -i " s/zend_extension=opcache.so/zend_extension=opcache.so\nopcache.memory_consumption=${EE_OPCACHE_SIZE} \nopcache.max_accelerated_files=50000/" /etc/php5/fpm/conf.d/05-opcache.ini \
460460 || ee_lib_error " Unable to change opcache.memory_consumption, exit status = " $?
@@ -490,12 +490,15 @@ if [[ $EE_CURRENT_VERSION < $EE_LATEST_VERSION ]]; then
490490 sed -i " s/a8b7c6d/$ee_random /" /var/www/22222/htdocs/db/pma/config.inc.php \
491491 || ee_lib_error " Unable to setup phpMyAdmin, exit status = " $?
492492 fi
493-
493+
494494 # Update EasyEngine current version
495495 EE_CURRENT_VERSION=" 2.2.0"
496496 fi
497- # if [[ $EE_CURRENT_VERSION = 2.2.0 ]]; then
498- # fi
497+ if [[ $EE_CURRENT_VERSION = 2.2.0 ]] || [[ $EE_CURRENT_VERSION = 2.0.1 ]]; then
498+ if [ -d /var/www/22222/htdocs/vimbadmin/ ]; then
499+ postconf -e " virtual_alias_maps = mysql:/etc/postfix/mysql/virtual_alias_maps.cf"
500+ fi
501+ fi
499502 fi
500503
501504 # Update WP-CLI
0 commit comments