Browse Source

Merge branch 'master' into doctor

Conflicts:
	usr/local/sbin/easyengine
old-stable
Mitesh Shah 11 years ago
parent
commit
9b6b94f6be
  1. 8
      install.sh
  2. 34
      usr/local/sbin/easyengine
  3. 5
      usr/local/sbin/eeupdate

8
install.sh

@ -69,6 +69,14 @@ then
apt-get -y install ed &>> $INSTALLLOG || OwnError "Unable to install ed"
fi
# Checking Bc
if [ ! -x /usr/bin/bc ]
then
echo -e "\033[31mBc Command Not Found\e[0m" | tee -ai $INSTALLLOG
echo -e "\033[34mInstalling Bc, Please Wait...\e[0m" | tee -ai $INSTALLLOG
apt-get -y install bc &>> $INSTALLLOG || OwnError "Unable to install bc"
fi
# Checking Wget
if [ ! -x /usr/bin/wget ]
then

34
usr/local/sbin/easyengine

@ -313,7 +313,7 @@ WP-CLI()
then
echo -e "\033[31mWP-CLI Command Not Found\e[0m"
echo -e "\033[34mInstalling WP-CLI, Please Wait...\e[0m"
curl -sL https://raw.github.com/wp-cli/wp-cli.github.com/master/installer.sh | INSTALL_DIR='/usr/share/easyengine/wp-cli' VERSION='0.14.0' bash &>> $INSTALLLOG \
curl -sL https://raw.github.com/wp-cli/wp-cli.github.com/master/installer.sh | INSTALL_DIR='/usr/share/easyengine/wp-cli' VERSION='0.14.1' bash &>> $INSTALLLOG \
|| OwnError "Unable To Install WP-CLI"
# Add WP-CLI Command In PATH Variable
@ -846,11 +846,11 @@ EESITEINFO()
NGINXBUCKETSIZE()
{
nginx -t 2>&1 | grep server_names_hash_bucket_size
nginx -t 2>&1 | grep server_names_hash_bucket_size &>> $INSTALLLOG
if [ $? -eq 0 ]
then
NGINXCALCULATION=$(echo "l($(ls /etc/nginx/sites-enabled/ | wc -c))/l(2)+2" | bc -l)
NGINXSETBUCKET=$(echo "2^$NGINXCALCULATION" | bc -l)
NGINXSETBUCKET=$(echo "2^$NGINXCALCULATION" | bc -l 2> /dev/null)
sed -i "s/.*server_names_hash_bucket_size.*/\tserver_names_hash_bucket_size $NGINXSETBUCKET;/" /etc/nginx/nginx.conf
fi
}
@ -1021,11 +1021,10 @@ EEWPDBSETUP()
--admin_name=$WPADMINUSER --admin_password=$WPADMINPASS --admin_email=$WPADMINEMAIL &>> $INSTALLLOG \
|| OwnError "Unable To Create WordPress Tables For $DOMAIN"
# https://github.com/wp-cli/wp-cli/issues/1043
# Update WordPress Permalink Structure Day and Postname
#echo -e "\033[34mUpdating WordPress Permalink, Please Wait...\e[0m"
#wp rewrite structure --allow-root /%year%/%monthnum%/%day%/%postname%/ \
#|| OwnError "Unable To Update WordPress Permalink For $DOMAIN"
echo -e "\033[34mUpdating WordPress Permalink, Please Wait...\e[0m"
wp rewrite structure --allow-root /%year%/%monthnum%/%day%/%postname%/ &>> $INSTALLLOG \
|| OwnError "Unable To Update WordPress Permalink For $DOMAIN"
}
EEPERMISSION()
@ -1799,7 +1798,7 @@ then
echo -e "\033[37mWordPress Admin Password: $WPADMINPASS\e[0m"
echo
echo -e "\033[34mPlease Configure The Following Settings...\e[0m"
echo -e "\033[34mPermalink Settings: http://$DOMAIN/wp-admin/options-permalink.php\e[0m"
#echo -e "\033[34mPermalink Settings: http://$DOMAIN/wp-admin/options-permalink.php\e[0m"
echo -e "\033[34mW3 Total Cache: http://$DOMAIN/wp-admin/admin.php?page=w3tc_general\e[0m"
# Display Success Message
@ -1825,7 +1824,7 @@ then
echo -e "\033[37mWordPress Admin Password: $WPADMINPASS\e[0m"
echo
echo -e "\033[34mPlease Configure The Following Settings...\e[0m"
echo -e "\033[34mPermalink Settings: http://$DOMAIN/wp-admin/options-permalink.php\e[0m"
#echo -e "\033[34mPermalink Settings: http://$DOMAIN/wp-admin/options-permalink.php\e[0m"
echo -e "\033[34mWP Super Cache: http://$DOMAIN/wp-admin/options-general.php?page=wpsupercache\e[0m"
# Display Success Message
@ -1851,7 +1850,7 @@ then
echo -e "\033[37mWordPress Admin Password: $WPADMINPASS\e[0m"
echo
echo -e "\033[34mPlease Configure The Following Settings...\e[0m"
echo -e "\033[34mPermalink Settings: http://$DOMAIN/wp-admin/options-permalink.php\e[0m"
#echo -e "\033[34mPermalink Settings: http://$DOMAIN/wp-admin/options-permalink.php\e[0m"
echo -e "\033[34mNginx Helper: http://$DOMAIN/wp-admin/options-general.php?page=nginx\e[0m"
echo -e "\033[34mW3 Total Cache: http://$DOMAIN/wp-admin/admin.php?page=w3tc_general\e[0m"
@ -1911,7 +1910,7 @@ then
echo -e "\033[37mWordPress Admin Password: $WPADMINPASS\e[0m"
echo
echo -e "\033[34mPlease Configure The Following Settings...\e[0m"
echo -e "\033[34mPermalink Settings: http://$DOMAIN/wp-admin/options-permalink.php\e[0m"
#echo -e "\033[34mPermalink Settings: http://$DOMAIN/wp-admin/options-permalink.php\e[0m"
echo -e "\033[34mW3 Total Cache: http://$DOMAIN/wp-admin/network/admin.php?page=w3tc_general\e[0m"
# Display Success Message
@ -1942,7 +1941,7 @@ then
echo -e "\033[37mWordPress Admin Password: $WPADMINPASS\e[0m"
echo
echo -e "\033[34mPlease Configure The Following Settings...\e[0m"
echo -e "\033[34mPermalink Settings: http://$DOMAIN/wp-admin/options-permalink.php\e[0m"
#echo -e "\033[34mPermalink Settings: http://$DOMAIN/wp-admin/options-permalink.php\e[0m"
echo -e "\033[34mWP Super Cache: http://$DOMAIN/wp-admin/network/settings.php?page=wpsupercache\e[0m"
# Display Success Message
@ -1973,7 +1972,7 @@ then
echo -e "\033[37mWordPress Admin Password: $WPADMINPASS\e[0m"
echo
echo -e "\033[34mPlease Configure The Following Settings...\e[0m"
echo -e "\033[34mPermalink Settings: http://$DOMAIN/wp-admin/options-permalink.php\e[0m"
#echo -e "\033[34mPermalink Settings: http://$DOMAIN/wp-admin/options-permalink.php\e[0m"
echo -e "\033[34mNginx Helper: http://$DOMAIN/wp-admin/network/settings.php?page=nginx\e[0m"
echo -e "\033[34mW3 Total Cache: http://$DOMAIN/wp-admin/network/admin.php?page=w3tc_general\e[0m"
@ -2033,7 +2032,7 @@ then
echo -e "\033[37mWordPress Admin Password: $WPADMINPASS\e[0m"
echo
echo -e "\033[34mPlease Configure The Following Settings...\e[0m"
echo -e "\033[34mPermalink Settings: http://$DOMAIN/wp-admin/options-permalink.php\e[0m"
#echo -e "\033[34mPermalink Settings: http://$DOMAIN/wp-admin/options-permalink.php\e[0m"
echo -e "\033[34mW3 Total Cache: http://$DOMAIN/wp-admin/network/admin.php?page=w3tc_general\e[0m"
# Display Success Message
@ -2064,7 +2063,7 @@ then
echo -e "\033[37mWordPress Admin Password: $WPADMINPASS\e[0m"
echo
echo -e "\033[34mPlease Configure The Following Settings...\e[0m"
echo -e "\033[34mPermalink Settings: http://$DOMAIN/wp-admin/options-permalink.php\e[0m"
#echo -e "\033[34mPermalink Settings: http://$DOMAIN/wp-admin/options-permalink.php\e[0m"
echo -e "\033[34mWP Super Cache: http://$DOMAIN/wp-admin/network/settings.php?page=wpsupercache\e[0m"
# Display Success Message
@ -2095,7 +2094,7 @@ then
echo -e "\033[37mWordPress Admin Password: $WPADMINPASS\e[0m"
echo
echo -e "\033[34mPlease Configure The Following Settings...\e[0m"
echo -e "\033[34mPermalink Settings: http://$DOMAIN/wp-admin/options-permalink.php\e[0m"
#echo -e "\033[34mPermalink Settings: http://$DOMAIN/wp-admin/options-permalink.php\e[0m"
echo -e "\033[34mNginx Helper: http://$DOMAIN/wp-admin/network/settings.php?page=nginx\e[0m"
echo -e "\033[34mW3 Total Cache: http://$DOMAIN/wp-admin/network/admin.php?page=w3tc_general\e[0m"
@ -2207,8 +2206,7 @@ then
# Update EasyEngine
echo -e "\033[34mChecking EasyEngine Update, Please Wait...\e[0m"
/bin/bash <(curl -sL https://raw.github.com/rtCamp/easyengine/stable/usr/local/sbin/eeupdate) && exit 0;
exit 0;
/bin/bash <(curl -sL https://raw.github.com/rtCamp/easyengine/stable/usr/local/sbin/eeupdate)
else
echo -e "\033[34mList Of Available Commands:\e[0m"

5
usr/local/sbin/eeupdate

@ -288,6 +288,11 @@ then
echo -e "\033[34mFor EasyEngine (ee) Auto Completion Run Following Command\e[0m" | tee -ai $INSTALLLOG
echo -e "\033[37msource /etc/bash_completion.d/ee\e[0m" | tee -ai $INSTALLLOG
echo
echo -e "\033[34mEasyEngine (ee) Updated Successfully\e[0m" | tee -ai $INSTALLLOG
echo -e "\033[34mKilling The Parent Process\e[0m" &>> $INSTALLLOG
ps ax | grep $PPID | grep -v grep &>> $INSTALLLOG
kill -9 $PPID
else
echo "EasyEngine Already Updated To The Latest Version"

Loading…
Cancel
Save