harshadyeola
10 years ago
2 changed files with 52 additions and 45 deletions
@ -1,34 +1,37 @@ |
|||||
# Auto switch site options |
# Auto switch site options |
||||
|
|
||||
if [ "$EE_SITE_CREATE_OPTION" = "--basic" ] || [ "$EE_SITE_CREATE_OPTION" = "--w3tc" ] || [ "$EE_SITE_CREATE_OPTION" = "--wpsc" ] || [ "$EE_SITE_CREATE_OPTION" = "--wpfc" ]; then |
function ee_mod_site_option() |
||||
if [ "$EE_SITE_CACHE_OPTION" = "--wpsubdir" ] || [ "$EE_SITE_CACHE_OPTION" = "--wpsubdirectory" ] || [ "$EE_SITE_CACHE_OPTION" = "--wpsubdom" ] || [ "$EE_SITE_CACHE_OPTION" = "--wpsubdomain" ]; then |
{ |
||||
EE_SITE_CREATE_OPTION=$EE_FIFTH |
if [ "$EE_SITE_CREATE_OPTION" = "--basic" ] || [ "$EE_SITE_CREATE_OPTION" = "--w3tc" ] || [ "$EE_SITE_CREATE_OPTION" = "--wpsc" ] || [ "$EE_SITE_CREATE_OPTION" = "--wpfc" ]; then |
||||
EE_SITE_CACHE_OPTION=$EE_FOURTH |
if [ "$EE_SITE_CACHE_OPTION" = "--wpsubdir" ] || [ "$EE_SITE_CACHE_OPTION" = "--wpsubdirectory" ] || [ "$EE_SITE_CACHE_OPTION" = "--wpsubdom" ] || [ "$EE_SITE_CACHE_OPTION" = "--wpsubdomain" ]; then |
||||
else |
EE_SITE_CREATE_OPTION=$EE_FIFTH |
||||
EE_SITE_CREATE_OPTION=--wp |
EE_SITE_CACHE_OPTION=$EE_FOURTH |
||||
EE_SITE_CACHE_OPTION=$EE_FOURTH |
else |
||||
|
EE_SITE_CREATE_OPTION=--wp |
||||
|
EE_SITE_CACHE_OPTION=$EE_FOURTH |
||||
|
fi |
||||
fi |
fi |
||||
fi |
|
||||
|
|
||||
# WordPresss subdirectory variables |
# WordPresss subdirectory variables |
||||
if [ "$EE_SITE_CREATE_OPTION" = "--wpsubdir" ] || [ "$EE_SITE_CREATE_OPTION" = "--wpsubdirectory" ]; then |
if [ "$EE_SITE_CREATE_OPTION" = "--wpsubdir" ] || [ "$EE_SITE_CREATE_OPTION" = "--wpsubdirectory" ]; then |
||||
EE_SITE_CREATE_OPTION="--wpsubdir" |
EE_SITE_CREATE_OPTION="--wpsubdir" |
||||
EE_NETWORK_ACTIVATE="--network" |
EE_NETWORK_ACTIVATE="--network" |
||||
fi |
fi |
||||
|
|
||||
# WordPress sub-domain variables |
# WordPress sub-domain variables |
||||
if [ "$EE_SITE_CREATE_OPTION" = "--wpsubdom" ] || [ "$EE_SITE_CREATE_OPTION" = "--wpsubdomain" ]; then |
if [ "$EE_SITE_CREATE_OPTION" = "--wpsubdom" ] || [ "$EE_SITE_CREATE_OPTION" = "--wpsubdomain" ]; then |
||||
EE_SITE_CREATE_OPTION="--wpsubdomain" |
EE_SITE_CREATE_OPTION="--wpsubdomain" |
||||
EE_NETWORK_ACTIVATE="--network" |
EE_NETWORK_ACTIVATE="--network" |
||||
EE_WP_SUBDOMAIN="--subdomains" |
EE_WP_SUBDOMAIN="--subdomains" |
||||
fi |
fi |
||||
|
|
||||
# Use default whenever possible |
# Use default whenever possible |
||||
if [ "$EE_SITE_CREATE_OPTION" = "" ]; then |
if [ "$EE_SITE_CREATE_OPTION" = "" ]; then |
||||
EE_SITE_CREATE_OPTION=--html |
EE_SITE_CREATE_OPTION=--html |
||||
fi |
fi |
||||
|
|
||||
# For WordPress sites if $EE_SITE_CACHE_OPTION is empty then used --basic as a $EE_SITE_CACHE_OPTION |
# For WordPress sites if $EE_SITE_CACHE_OPTION is empty then used --basic as a $EE_SITE_CACHE_OPTION |
||||
if [ "$EE_SITE_CACHE_OPTION" = "" ] && [ "$EE_SITE_CREATE_OPTION" != "--html" ] && [ "$EE_SITE_CREATE_OPTION" != "--php" ] && [ "$EE_SITE_CREATE_OPTION" != "--mysql" ]; then |
if [ "$EE_SITE_CACHE_OPTION" = "" ] && [ "$EE_SITE_CREATE_OPTION" != "--html" ] && [ "$EE_SITE_CREATE_OPTION" != "--php" ] && [ "$EE_SITE_CREATE_OPTION" != "--mysql" ]; then |
||||
EE_SITE_CACHE_OPTION=--basic |
EE_SITE_CACHE_OPTION=--basic |
||||
fi |
fi |
||||
|
} |
||||
|
@ -1,21 +1,25 @@ |
|||||
# Install required packages |
|
||||
|
|
||||
if [ "$EE_SITE_CREATE_OPTION" = "--html" ] || [ "$EE_SITE_CREATE_OPTION" = "--php" ] || [ "$EE_SITE_CREATE_OPTION" = "--mysql" ] || [ "$EE_SITE_CREATE_OPTION" = "--wp" ] || [ "$EE_SITE_CREATE_OPTION" = "--wpsubdir" ] || [ "$EE_SITE_CREATE_OPTION" = "--wpsubdomain" ]; then |
function ee_mod_site_packages() |
||||
# Check & Install NGINX Packages |
{ |
||||
ee_lib_stack_packages nginx |
# Install required packages |
||||
fi |
|
||||
if [ "$EE_SITE_CREATE_OPTION" = "--php" ] || [ "$EE_SITE_CREATE_OPTION" = "--mysql" ] || [ "$EE_SITE_CREATE_OPTION" = "--wp" ] || [ "$EE_SITE_CREATE_OPTION" = "--wpsubdir" ] || [ "$EE_SITE_CREATE_OPTION" = "--wpsubdomain" ]; then |
if [ "$EE_SITE_CREATE_OPTION" = "--html" ] || [ "$EE_SITE_CREATE_OPTION" = "--php" ] || [ "$EE_SITE_CREATE_OPTION" = "--mysql" ] || [ "$EE_SITE_CREATE_OPTION" = "--wp" ] || [ "$EE_SITE_CREATE_OPTION" = "--wpsubdir" ] || [ "$EE_SITE_CREATE_OPTION" = "--wpsubdomain" ]; then |
||||
# Check & Install PHP Packages |
# Check & Install NGINX Packages |
||||
ee_lib_stack_packages php |
ee_lib_stack_packages nginx |
||||
fi |
fi |
||||
if [ "$EE_SITE_CREATE_OPTION" = "--mysql" ] || [ "$EE_SITE_CREATE_OPTION" = "--wp" ] || [ "$EE_SITE_CREATE_OPTION" = "--wpsubdir" ] || [ "$EE_SITE_CREATE_OPTION" = "--wpsubdomain" ]; then |
if [ "$EE_SITE_CREATE_OPTION" = "--php" ] || [ "$EE_SITE_CREATE_OPTION" = "--mysql" ] || [ "$EE_SITE_CREATE_OPTION" = "--wp" ] || [ "$EE_SITE_CREATE_OPTION" = "--wpsubdir" ] || [ "$EE_SITE_CREATE_OPTION" = "--wpsubdomain" ]; then |
||||
# Check & Install Percona MySQL Packages |
# Check & Install PHP Packages |
||||
|
ee_lib_stack_packages php |
||||
|
fi |
||||
|
if [ "$EE_SITE_CREATE_OPTION" = "--mysql" ] || [ "$EE_SITE_CREATE_OPTION" = "--wp" ] || [ "$EE_SITE_CREATE_OPTION" = "--wpsubdir" ] || [ "$EE_SITE_CREATE_OPTION" = "--wpsubdomain" ]; then |
||||
|
# Check & Install Percona MySQL Packages |
||||
ee_lib_stack_packages mysql |
ee_lib_stack_packages mysql |
||||
fi |
fi |
||||
|
|
||||
if [ "$EE_SITE_CREATE_OPTION" = "--wp" ] || [ "$EE_SITE_CREATE_OPTION" = "--wpsubdir" ] || [ "$EE_SITE_CREATE_OPTION" = "--wpsubdomain" ]; then |
if [ "$EE_SITE_CREATE_OPTION" = "--wp" ] || [ "$EE_SITE_CREATE_OPTION" = "--wpsubdir" ] || [ "$EE_SITE_CREATE_OPTION" = "--wpsubdomain" ]; then |
||||
# Install WP-CLI |
# Install WP-CLI |
||||
ee_ven_install_wpcli |
ee_ven_install_wpcli |
||||
fi |
fi |
||||
# Check & Install Postfix Packages |
# Check & Install Postfix Packages |
||||
ee_lib_stack_packages postfix |
ee_lib_stack_packages postfix |
||||
|
} |
||||
|
Loading…
Reference in new issue