|
|
@ -363,8 +363,8 @@ if [[ $EE_CURRENT_VERSION < $EE_LATEST_VERSION ]]; then |
|
|
|
fi |
|
|
|
# Update NGINX |
|
|
|
if [ "$EE_LINUX_DISTRO" == "Ubuntu" ]; then |
|
|
|
nginx -v 2>&1 | grep 1.6.0 &>> $EE_UPDATE_LOG |
|
|
|
if [ $? -ne 0 ]; then |
|
|
|
ls /etc/apt/sources.list.d/brianmercer-nginx* &>> $EE_UPDATE_LOG |
|
|
|
if [ $? -eq 0 ]; then |
|
|
|
rm /etc/apt/sources.list.d/brianmercer-nginx* |
|
|
|
# Add rtCamp nginx launchpad repository |
|
|
|
ee_lib_echo "Adding rtCamp NGINX launchpad repository, please wait..." |
|
|
@ -395,57 +395,45 @@ if [[ $EE_CURRENT_VERSION < $EE_LATEST_VERSION ]]; then |
|
|
|
done |
|
|
|
fi |
|
|
|
|
|
|
|
if [[ $EE_CURRENT_VERSION = 2.0.0 ]]; then |
|
|
|
dpkg --get-selections | grep -v deinstall | grep php5-fpm &>> $EE_UPDATE_LOG |
|
|
|
if [ $? -eq 0 ]; then |
|
|
|
|
|
|
|
# WP-CLI change the installation method |
|
|
|
rm -rf /usr/share/easyengine/wp-cli /usr/share/wp-cli /usr/bin/wp /etc/bash_completion.d/wp-completion.bash |
|
|
|
if [[ $EE_CURRENT_VERSION = 2.0.0 ]] || [[ $EE_CURRENT_VERSION = 2.0.1 ]]; then |
|
|
|
sed -i 's/host =.*/grant-host = localhost/' /etc/easyengine/ee.conf |
|
|
|
|
|
|
|
# Install WP-CLI |
|
|
|
ee_ven_install_wpcli |
|
|
|
# Add Vimbadmin rules |
|
|
|
if [ -f /etc/nginx/sites-available/22222 ];then |
|
|
|
ee_port=$(grep listen /etc/nginx/sites-available/22222 | awk '{ print $2 }') |
|
|
|
cp -av /usr/share/easyengine/nginx/22222 /etc/nginx/sites-available/ &>> $EE_UPDATE_LOG |
|
|
|
if [ "$EE_LINUX_DISTRO" == "Ubuntu" ]; then |
|
|
|
sed -i "s/listen.*/listen $ee_port default_server ssl spdy;/" /etc/nginx/sites-available/22222 \ |
|
|
|
|| ee_lib_error "Unable to change EasyEngine admin port, exit status = " $? |
|
|
|
elif [ "$EE_LINUX_DISTRO" == "Debian" ]; then |
|
|
|
# Dotdeb nginx repository doesn't support spdy |
|
|
|
sed -i "s/listen.*/listen $ee_port default_server ssl;/" /etc/nginx/sites-available/22222 \ |
|
|
|
|| ee_lib_error "Unable to change EasyEngine admin port, exit status = " $? |
|
|
|
fi |
|
|
|
fi |
|
|
|
# Update EasyEngine current version |
|
|
|
EE_CURRENT_VERSION="2.0.1" |
|
|
|
fi |
|
|
|
|
|
|
|
if [[ $EE_CURRENT_VERSION = 2.0.1 ]]; then |
|
|
|
sed -i 's/host =.*/grant-host = localhost/' /etc/easyengine/ee.conf |
|
|
|
fi |
|
|
|
fi |
|
|
|
if [ -d /var/www/22222/htdocs/db/anemometer ];then |
|
|
|
# Download pt-query-advisor Fixed #189 |
|
|
|
wget -q http://bazaar.launchpad.net/~percona-toolkit-dev/percona-toolkit/2.1/download/head:/ptquerydigest-20110624220137-or26tn4expb9ul2a-16/pt-query-digest -O /usr/bin/pt-query-advisor \ |
|
|
|
|| ee_lib_error "Unable to copy download pt-query-advisor, exit status = " $? |
|
|
|
chmod 0755 /usr/bin/pt-query-advisor |
|
|
|
|
|
|
|
if [[ $EE_CURRENT_VERSION < 2.1.0 ]];then |
|
|
|
if [ -f /etc/nginx/sites-available/22222 ];then |
|
|
|
ee_port=$(grep listen /etc/nginx/sites-available/22222 | awk '{ print $2 }') |
|
|
|
cp -av /usr/share/easyengine/nginx/22222 /etc/nginx/sites-available/ &>> $EE_UPDATE_LOG |
|
|
|
if [ "$EE_LINUX_DISTRO" == "Ubuntu" ]; then |
|
|
|
sed -i "s/listen.*/listen $ee_port default_server ssl spdy;/" /etc/nginx/sites-available/22222 \ |
|
|
|
|| ee_lib_error "Unable to change EasyEngine admin port, exit status = " $? |
|
|
|
elif [ "$EE_LINUX_DISTRO" == "Debian" ]; then |
|
|
|
# Dotdeb nginx repository doesn't support spdy |
|
|
|
sed -i "s/listen.*/listen $ee_port default_server ssl;/" /etc/nginx/sites-available/22222 \ |
|
|
|
|| ee_lib_error "Unable to change EasyEngine admin port, exit status = " $? |
|
|
|
# Enable pt-query-advisor plugin in Anemometer |
|
|
|
sed -i "s/# 'query_advisor'/ 'query_advisor'/" /var/www/22222/htdocs/db/anemometer/conf/config.inc.php \ |
|
|
|
|| ee_lib_error "Unable to to activate pt-query-advisor plugin, exit status = " $? |
|
|
|
fi |
|
|
|
fi |
|
|
|
if [ -d /var/www/22222/htdocs/db/anemometer ];then |
|
|
|
# Download pt-query-advisor Fixed #189 |
|
|
|
wget -q http://bazaar.launchpad.net/~percona-toolkit-dev/percona-toolkit/2.1/download/head:/ptquerydigest-20110624220137-or26tn4expb9ul2a-16/pt-query-digest -O /usr/bin/pt-query-advisor \ |
|
|
|
|| ee_lib_error "Unable to copy download pt-query-advisor, exit status = " $? |
|
|
|
chmod 0755 /usr/bin/pt-query-advisor |
|
|
|
|
|
|
|
# Enable pt-query-advisor plugin in Anemometer |
|
|
|
sed -i "s/# 'query_advisor'/ 'query_advisor'/" /var/www/22222/htdocs/db/anemometer/conf/config.inc.php \ |
|
|
|
|| ee_lib_error "Unable to to activate pt-query-advisor plugin, exit status = " $? |
|
|
|
|
|
|
|
# Update EasyEngine current version |
|
|
|
EE_CURRENT_VERSION="2.1.0" |
|
|
|
fi |
|
|
|
|
|
|
|
# Update EasyEngine current version |
|
|
|
EE_CURRENT_VERSION="2.1.0" |
|
|
|
fi |
|
|
|
if [[ $EE_CURRENT_VERSION < 2.1.1 ]]; then |
|
|
|
# Install WP-CLI |
|
|
|
ee_ven_install_wpcli |
|
|
|
# if [[ $EE_CURRENT_VERSION = 2.1.0 ]]; then |
|
|
|
# fi |
|
|
|
fi |
|
|
|
|
|
|
|
# Update WP-CLI |
|
|
|
ee_ven_install_wpcli |
|
|
|
|
|
|
|
# Restart service |
|
|
|
ee_lib_service nginx php5-fpm restart |
|
|
|
|
|
|
|