|
@ -26,8 +26,7 @@ class EESiteController(CementBaseController): |
|
|
label = 'site' |
|
|
label = 'site' |
|
|
stacked_on = 'base' |
|
|
stacked_on = 'base' |
|
|
stacked_type = 'nested' |
|
|
stacked_type = 'nested' |
|
|
description = ('Site command manages website configuration' |
|
|
description = ('Performs website specific operations') |
|
|
' with the help of the following subcommands') |
|
|
|
|
|
arguments = [ |
|
|
arguments = [ |
|
|
(['site_name'], |
|
|
(['site_name'], |
|
|
dict(help='Website name')), |
|
|
dict(help='Website name')), |
|
@ -405,7 +404,7 @@ class EESiteCreateController(CementBaseController): |
|
|
self.app.close(1) |
|
|
self.app.close(1) |
|
|
|
|
|
|
|
|
# Check rerequired packages are installed or not |
|
|
# Check rerequired packages are installed or not |
|
|
site_package_check(self, stype) |
|
|
ee_auth = site_package_check(self, stype) |
|
|
# setup NGINX configuration, and webroot |
|
|
# setup NGINX configuration, and webroot |
|
|
setupdomain(self, data) |
|
|
setupdomain(self, data) |
|
|
# Setup database for MySQL site |
|
|
# Setup database for MySQL site |
|
@ -440,10 +439,14 @@ class EESiteCreateController(CementBaseController): |
|
|
.format(ee_www_domain, stype, cache)) |
|
|
.format(ee_www_domain, stype, cache)) |
|
|
# Setup Permissions for webroot |
|
|
# Setup Permissions for webroot |
|
|
setwebrootpermissions(self, data['webroot']) |
|
|
setwebrootpermissions(self, data['webroot']) |
|
|
|
|
|
if len(ee_auth): |
|
|
|
|
|
for msg in ee_auth: |
|
|
|
|
|
Log.info(self, Log.ENDC + msg) |
|
|
|
|
|
|
|
|
if data['wp']: |
|
|
if data['wp']: |
|
|
Log.info(self, Log.ENDC + "WordPress Admin User :" |
|
|
Log.info(self, Log.ENDC + "WordPress admin user :" |
|
|
" {0}".format(ee_wp_creds['wp_user'])) |
|
|
" {0}".format(ee_wp_creds['wp_user'])) |
|
|
Log.info(self, Log.ENDC + "WordPress Admin User Password : {0}" |
|
|
Log.info(self, Log.ENDC + "WordPress admin user password : {0}" |
|
|
.format(ee_wp_creds['wp_pass'])) |
|
|
.format(ee_wp_creds['wp_pass'])) |
|
|
addNewSite(self, ee_www_domain, stype, cache, ee_site_webroot) |
|
|
addNewSite(self, ee_www_domain, stype, cache, ee_site_webroot) |
|
|
Log.info(self, "Successfully created site" |
|
|
Log.info(self, "Successfully created site" |
|
@ -882,9 +885,9 @@ class EESiteUpdateController(CementBaseController): |
|
|
# setwebrootpermissions(self, data['webroot']) |
|
|
# setwebrootpermissions(self, data['webroot']) |
|
|
|
|
|
|
|
|
if data['wp'] and oldsitetype in ['html', 'php', 'mysql']: |
|
|
if data['wp'] and oldsitetype in ['html', 'php', 'mysql']: |
|
|
Log.info(self, Log.ENDC + "WordPress Admin User :" |
|
|
Log.info(self, Log.ENDC + "WordPress admin user :" |
|
|
" {0}".format(ee_wp_creds['wp_user'])) |
|
|
" {0}".format(ee_wp_creds['wp_user'])) |
|
|
Log.info(self, Log.ENDC + "WordPress Admin User Password : {0}" |
|
|
Log.info(self, Log.ENDC + "WordPress admin password : {0}" |
|
|
.format(ee_wp_creds['wp_pass'])) |
|
|
.format(ee_wp_creds['wp_pass'])) |
|
|
|
|
|
|
|
|
updateSiteInfo(self, ee_www_domain, stype=stype, cache=cache) |
|
|
updateSiteInfo(self, ee_www_domain, stype=stype, cache=cache) |
|
|