Browse Source

Fixed Database creation issue

old-stable
Mitesh Shah 11 years ago
parent
commit
493acfbae9
  1. 1
      src/lib/ee_lib_symbolic_link.sh
  2. 5
      src/modules/site/create/ee_mod_setup_database.sh
  3. 2
      src/modules/site/create/ee_mod_setup_domain.sh
  4. 3
      src/modules/site/create/ee_mod_setup_wordpress.sh

1
src/lib/ee_lib_symbolic_link.sh

@ -3,7 +3,6 @@
function ee_lib_symbolic_link()
{
# Creating symbolic link
ee_lib_echo "Creating symbolic link, please wait..."
ln -sf $1 $2 \
|| ee_lib_error "Unable to create symbolic link for $1 -> $2, exit status = " $?
}

5
src/modules/site/create/ee_mod_setup_database.sh

@ -54,9 +54,10 @@ function ee_mod_setup_database()
# Create MySQL User
mysql -e "create user '$EE_DB_USER'@'$EE_MYSQL_HOST' identified by '$EE_DB_PASS'" \
|| ee_lib_error "Unable to create $EE_DB_USER database, exit status = " $?
|| ee_lib_error "Unable to create $EE_DB_USER database user, exit status = " $?
# Grant permission
mysql -e "grant all privileges on \`$EE_DB_NAME\`.* to '$EE_DB_USER'@'$EE_MYSQL_HOST'"
mysql -e "grant all privileges on \`$EE_DB_NAME\`.* to '$EE_DB_USER'@'$EE_MYSQL_HOST'" \
|| ee_lib_error "Unable to grant privileges for $EE_DB_USER database user, exit status = " $?
mysql -e "flush privileges"
}

2
src/modules/site/create/ee_mod_setup_domain.sh

@ -13,6 +13,7 @@ function ee_mod_setup_domain()
|| ee_lib_error "Unable to create NGINX configuration file for $EE_DOMAIN, exit status = " $?
# Creating symbolic link
ee_lib_echo "Creating symbolic link for $EE_DOMAIN"
ee_lib_symbolic_link /etc/nginx/sites-available/$EE_DOMAIN /etc/nginx/sites-enabled/
# Creating htdocs & logs directory
@ -21,7 +22,6 @@ function ee_mod_setup_domain()
|| ee_lib_error "Unable to create htdocs & logs directory, exit status = " $?
# Creating symbolic links for logs
ee_lib_echo "Creating symbolic link for logs"
ee_lib_symbolic_link /var/log/nginx/$EE_DOMAIN.access.log /var/www/$EE_DOMAIN/logs/access.log
ee_lib_symbolic_link /var/log/nginx/$EE_DOMAIN.error.log /var/www/$EE_DOMAIN/logs/error.log
else

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

@ -37,9 +37,6 @@ function ee_mod_setup_wordpress()
EE_WP_PREFIX=wp_
fi
# Database setup
ee_mod_setup_database
# Modify wp-config.php & move outside the webroot
cp /var/www/$EE_DOMAIN/htdocs/wp-config-sample.php \
/var/www/$EE_DOMAIN/wp-config.php

Loading…
Cancel
Save