Browse Source

mysql site update code

bugfixes
harshadyeola 10 years ago
parent
commit
d78a2c0456
  1. 2
      bin/easyengine
  2. 6
      src/modules/site/create/ee_mod_setup_wordpress.sh

2
bin/easyengine

@ -628,6 +628,8 @@ elif [ "$EE_FIRST" = "site" ]; then
if [ "$EE_SITE_CREATE_OPTION" = "--wp" ] || [ "$EE_SITE_CREATE_OPTION" = "--wpsubdomain" ] || [ "$EE_SITE_CREATE_OPTION" = "--wpsubdir" ]; then
if [ "$EE_SITE_CURRENT_OPTION" = "MYSQL" ]; then
EE_DB_NAME=$(grep DB_NAME $(grep root /etc/nginx/sites-available/$EE_DOMAIN | awk '{ print $2 }' | sed 's/;//g' | sed 's/htdocs/*-config.php/' 2> /dev/null) | cut -d"'" -f4)
EE_DB_USER=$(grep DB_USER $(grep root /etc/nginx/sites-available/$EE_DOMAIN | awk '{ print $2 }' | sed 's/;//g' | sed 's/htdocs/*-config.php/' 2> /dev/null) | cut -d"'" -f4)
EE_DB_PASS=$(grep DB_PASSWORD $(grep root /etc/nginx/sites-available/$EE_DOMAIN | awk '{ print $2 }' | sed 's/;//g' | sed 's/htdocs/*-config.php/' 2> /dev/null) | cut -d"'" -f4)
fi
ee_mod_setup_wordpress
fi

6
src/modules/site/create/ee_mod_setup_wordpress.sh

@ -11,7 +11,11 @@ function ee_mod_setup_wordpress()
|| ee_lib_error "Unable to download WordPress, exit status = " $?
# Database setup
ee_mod_setup_database
# if EE_DB_NAME, EE_DB_USER, EE_DB_PASS are empty then setup database for new site
# else current mysql site is to be updated
if [ "EE_DB_NAME" = "" ] && [ "EE_DB_USER" = "" ] && [ "EE_DB_PASS" = "" ]; then
ee_mod_setup_database
fi
# Default WordPress prefix or custom prefix
if [ $($EE_CONFIG_GET wordpress.prefix) == "true" ];then

Loading…
Cancel
Save