Browse Source

minor bug fixes

bugfixes
harshadyeola 10 years ago
parent
commit
279c2391ce
  1. 4
      src/modules/site/ee_mod_site_backup.sh
  2. 1
      src/modules/site/ee_mod_site_packages.sh
  3. 4
      src/modules/site/update/ee_mod_update_domain.sh

4
src/modules/site/ee_mod_site_backup.sh

@ -4,13 +4,13 @@ function ee_mod_site_backup()
{
# Backup directory setup
local ee_webroot=$(grep root /etc/nginx/sites-available/$EE_DOMAIN | awk '{ print $2 }' | sed 's/;//g' | sed 's/\/htdocs//')
if [ ! -d $ee_webroot/backup ] || [ ! -d $ee_webroot/backup/htdocs ] || [ ! -d $ee_webroot/backup/nginx ] || [ ! -d $ee_webroot/backup/db ] ; then
if [ ! -d $ee_webroot/backup ] || [ ! -d $ee_webroot/backup/htdocs ] || [ ! -d $ee_webroot/backup/nginx ] || [ ! -d $ee_webroot/backup/db ]; then
mkdir -p $ee_webroot/backup/{htdocs,nginx,db} || ee_lib_error "Unable to create $ee_webroot/backup directory, exit status =" $?
fi
# Move htdocs
if [ "$EE_SITE_CURRENT_OPTION" = "HTML"] || [ "$EE_SITE_CURRENT_OPTION" = "MYSQL"] || [ "$EE_SITE_CURRENT_OPTION" = "PHP"]; then
mv $ee_webroot/htdocs $ee_webroot/backup/htdocs/htdocs-$(date +"%m-%d-%y")
mv $ee_webroot/htdocs $ee_webroot/backup/htdocs/htdocs-$(date +"%m-%d-%y") || ee_lib_error "Unable to create $ee_webroot/htdocs backup, exit status =" $?
mkdir -p $ee_webroot/htdocs
fi

1
src/modules/site/ee_mod_site_packages.sh

@ -1,3 +1,4 @@
# Install Required Packages while site create
function ee_mod_site_packages()
{

4
src/modules/site/update/ee_mod_update_domain.sh

@ -11,11 +11,11 @@ function ee_mod_update_domain()
ee_lib_echo "Updating $EE_DOMAIN, please wait..."
if [ -f /etc/nginx/sites-available/$EE_DOMAIN ]; then
EE_SITE_CURRENT_CONF=$(head -n1 /etc/nginx/sites-available/$EE_DOMAIN | grep "NGINX CONFIGURATION")
EE_SITE_UPDATE_CONF=$(head -n1 $EE_NGINX_CONF | grep "NGINX CONFIGURATION")
EE_SITE_UPDATE_CONF=$(head -n1 /usr/share/easyengine/nginx/$EE_NGINX_CONF | grep "NGINX CONFIGURATION")
EE_SITE_CONF="/etc/nginx/sites-available/$EE_DOMAIN"
# Update Head Line of NGINX conf
sed -i 's/$EE_SITE_CURRENT_CONF/$EE_SITE_UPDATE_CONF/' $EE_SITE_CONF || ee_lib_error "Unable to update nginx configuration to $EE_SITE_CREATE_OPTION, $EE_SITE_CACHE_OPTION for $EE_DOMAIN, exit status =" $?
sed -i "s'$EE_SITE_CURRENT_CONF'$EE_SITE_UPDATE_CONF'" $EE_SITE_CONF || ee_lib_error "Unable to update nginx configuration to $EE_SITE_CREATE_OPTION, $EE_SITE_CACHE_OPTION for $EE_DOMAIN, exit status =" $?
# Update Head Line of NGINX conf file
if [ "$EE_SITE_CREATE_OPTION" = "--wpsubdir" ] || [ "$EE_SITE_CREATE_OPTION" = "--wpsubdomain" ] \

Loading…
Cancel
Save