From ac88dec9344fade052b6bd742d9a810c6b15fb10 Mon Sep 17 00:00:00 2001 From: gau1991 Date: Thu, 5 Feb 2015 12:11:36 +0530 Subject: [PATCH 01/16] Fixed import slow log --- ee/cli/plugins/import_slow_log.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ee/cli/plugins/import_slow_log.py b/ee/cli/plugins/import_slow_log.py index fece6771..b52bf72b 100644 --- a/ee/cli/plugins/import_slow_log.py +++ b/ee/cli/plugins/import_slow_log.py @@ -24,7 +24,7 @@ class EEImportslowlogController(CementBaseController): .format(EEVariables.ee_webroot)): if os.path.isfile("/var/log/mysql/mysql-slow.log"): # Get Anemometer user name and password - Log.error(self, "Importing MySQL slow log to Anemometer") + Log.info(self, "Importing MySQL slow log to Anemometer") host = os.popen("grep -e \"\'host\'\" {0}22222/htdocs/" .format(EEVariables.ee_webroot) + "db/anemometer/conf/config.inc.php " From aa9a4a2230d89d25694eab3cf5d62d94e7dec970 Mon Sep 17 00:00:00 2001 From: gau1991 Date: Thu, 5 Feb 2015 12:23:13 +0530 Subject: [PATCH 02/16] Fixed percona toolkit not installing --- ee/core/variables.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ee/core/variables.py b/ee/core/variables.py index 9c97032d..26bae560 100644 --- a/ee/core/variables.py +++ b/ee/core/variables.py @@ -92,7 +92,7 @@ class EEVariables(): # MySQL repo and packages ee_mysql_repo = ("deb http://repo.percona.com/apt {codename} main" .format(codename=ee_platform_codename)) - ee_mysql = ["percona-server-server-5.6"] + ee_mysql = ["percona-server-server-5.6", "mysqltuner", "percona-toolkit"] # Postfix repo and packages ee_postfix_repo = "" From a79c23afce1e4dc4ec71c22fea09b70bade67420 Mon Sep 17 00:00:00 2001 From: harshadyeola Date: Thu, 5 Feb 2015 12:34:39 +0530 Subject: [PATCH 03/16] modified ee site enable disable --- ee/cli/plugins/site.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ee/cli/plugins/site.py b/ee/cli/plugins/site.py index af59dec0..e3d603c9 100644 --- a/ee/cli/plugins/site.py +++ b/ee/cli/plugins/site.py @@ -39,7 +39,7 @@ class EESiteController(CementBaseController): @expose(help="Enable site example.com") def enable(self): (ee_domain, ee_www_domain) = ValidateDomain(self.app.pargs.site_name) - Log.info(self, "Enable domain {0:10}".format(ee_domain), end='') + Log.info(self, "Enable domain {0:10} \t".format(ee_domain), end='') if os.path.isfile('/etc/nginx/sites-available/{0}' .format(ee_domain)): EEFileUtils.create_symlink(self, @@ -47,15 +47,17 @@ class EESiteController(CementBaseController): .format(ee_domain), '/etc/nginx/sites-enabled/{0}' .format(ee_domain)]) + updateSiteInfo(self, ee_domain, enabled=True) Log.info(self, "[" + Log.ENDC + "OK" + Log.OKBLUE + "]") + EEService.reload_service(self, 'nginx') else: Log.error(self, " site {0} does not exists".format(ee_domain)) @expose(help="Disable site example.com") def disable(self): (ee_domain, ee_www_domain) = ValidateDomain(self.app.pargs.site_name) - Log.info(self, "Disable domain {0:10}".format(ee_domain), end='') + Log.info(self, "Disable domain {0:10} \t".format(ee_domain), end='') if os.path.isfile('/etc/nginx/sites-available/{0}' .format(ee_domain)): if not os.path.isfile('/etc/nginx/sites-enabled/{0}' @@ -68,6 +70,7 @@ class EESiteController(CementBaseController): .format(ee_domain)) updateSiteInfo(self, ee_domain, enabled=False) Log.info(self, "[" + Log.ENDC + "OK" + Log.OKBLUE + "]") + EEService.reload_service(self, 'nginx') else: Log.error(self, " site {0} does not exists".format(ee_domain)) From 5e63f059754d535e800e29675adcc8e41c933484 Mon Sep 17 00:00:00 2001 From: gau1991 Date: Thu, 5 Feb 2015 13:52:14 +0530 Subject: [PATCH 04/16] MySQL query to debug log --- ee/core/mysql.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ee/core/mysql.py b/ee/core/mysql.py index da77740f..d288dab8 100644 --- a/ee/core/mysql.py +++ b/ee/core/mysql.py @@ -43,6 +43,7 @@ class EEMysql(): .format(e)) try: + Log.debug(self, "Executing MySQL statement: {0}".format(statement)) cur.execute(statement) except Exception as e: cur.close() From efe4f531e3691bbf227f1894fe75866ee39b5a1a Mon Sep 17 00:00:00 2001 From: gau1991 Date: Thu, 5 Feb 2015 14:06:49 +0530 Subject: [PATCH 05/16] Fixed slow query plugin issue --- ee/cli/templates/anemometer.mustache | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ee/cli/templates/anemometer.mustache b/ee/cli/templates/anemometer.mustache index e082ce50..7b85a6a7 100644 --- a/ee/cli/templates/anemometer.mustache +++ b/ee/cli/templates/anemometer.mustache @@ -125,8 +125,8 @@ $conf['plugins'] = array( $conn['db'] = $sample['db_max']; } - $conn['user'] = 'root'; - $conn['password'] = ''; + $conn['user'] = '{{user}}'; + $conn['password'] = '{{password}}'; return $conn; }, From bdb8942bb587eb274d3c9236de4676d93f3f681b Mon Sep 17 00:00:00 2001 From: Gaurav Ashtikar Date: Thu, 5 Feb 2015 14:45:05 +0530 Subject: [PATCH 06/16] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a119d9bf..80779333 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ EasyEngine (ee) is a linux shell-script collection, which makes it easy to manag ## Quick Start ```bash -wget http://rt.cx/eebeta && sudo bash install # install easyengine 3.0.0-beta +wget http://rt.cx/eebeta && sudo bash eebeta # install easyengine 3.0.0-beta sudo ee site create example.com --wp # Install required packages & setup WordPress on example.com ``` From 7f190b959d38b5f5329e5748323d3050caeefee3 Mon Sep 17 00:00:00 2001 From: gau1991 Date: Thu, 5 Feb 2015 15:42:57 +0530 Subject: [PATCH 07/16] Fixed mailscan config issue --- ee/cli/plugins/stack.py | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/ee/cli/plugins/stack.py b/ee/cli/plugins/stack.py index 716ba8d7..9386fc8a 100644 --- a/ee/cli/plugins/stack.py +++ b/ee/cli/plugins/stack.py @@ -640,10 +640,38 @@ class EEStackController(CementBaseController): "smtp-amavis:[127.0.0.1]:10024\"") EEShellExec.cmd_exec(self, "sed -i \"s/1 pickup/1 " "pickup" - "\\n -o content_filter=\\n -o" + "\\n -o content_filter=\\n -o" " receive_override_options=no_header_body" "_checks/\" /etc/postfix/master.cf") + amavis_master = """smtp-amavis unix - - n - 2 smtp + -o smtp_data_done_timeout=1200 + -o smtp_send_xforward_command=yes + -o disable_dns_lookups=yes + -o max_use=20 +127.0.0.1:10025 inet n - n - - smtpd + -o content_filter= + -o smtpd_delay_reject=no + -o smtpd_client_restrictions=permit_mynetworks,reject + -o smtpd_helo_restrictions= + -o smtpd_sender_restrictions= + -o smtpd_recipient_restrictions=permit_mynetworks,reject + -o smtpd_data_restrictions=reject_unauth_pipelining + -o smtpd_end_of_data_restrictions= + -o smtpd_restriction_classes= + -o mynetworks=127.0.0.0/8 + -o smtpd_error_sleep_time=0 + -o smtpd_soft_error_limit=1001 + -o smtpd_hard_error_limit=1000 + -o smtpd_client_connection_count_limit=0 + -o smtpd_client_connection_rate_limit=0 + -o receive_override_options=no_header_body_checks,no_unknown_recipient_checks + -o local_header_rewrite_clients= +""" + + with open("/etc/postfix/master.cf", "a") as am_config: + am_config.write(amavis_master) + # Amavis ClamAV configuration Log.debug(self, "Adding new user clamav amavis") EEShellExec.cmd_exec(self, "adduser clamav amavis") From ff81c42e0afd0e0f2bfff77b2be83731f493d889 Mon Sep 17 00:00:00 2001 From: gau1991 Date: Thu, 5 Feb 2015 16:36:01 +0530 Subject: [PATCH 08/16] Improved Amavis setup --- ee/cli/plugins/stack.py | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/ee/cli/plugins/stack.py b/ee/cli/plugins/stack.py index 9386fc8a..38553767 100644 --- a/ee/cli/plugins/stack.py +++ b/ee/cli/plugins/stack.py @@ -1182,7 +1182,15 @@ class EEStackController(CementBaseController): "Adminer"]] if self.app.pargs.mailscanner: - apt_packages = (apt_packages + EEVariables.ee_mailscanner) + if not EEAptGet.is_installed(self, 'amavisd-new'): + if (EEAptGet.is_installed(self, 'dovecot-core') or + self.app.pargs.mail): + apt_packages = (apt_packages + + EEVariables.ee_mailscanner) + else: + Log.error(self, "Failed to find installed Dovecot") + else: + Log.error(self, "Mail scanner allready installed") if self.app.pargs.utils: Log.debug(self, "Setting packages variable for utils") @@ -1266,7 +1274,8 @@ class EEStackController(CementBaseController): (not self.app.pargs.php) and (not self.app.pargs.mysql) and (not self.app.pargs.postfix) and (not self.app.pargs.wpcli) and (not self.app.pargs.phpmyadmin) and - (not self.app.pargs.adminer) and (not self.app.pargs.utils)): + (not self.app.pargs.adminer) and (not self.app.pargs.utils) and + (not self.app.pargs.mailscanner)): self.app.pargs.web = True if self.app.pargs.web: @@ -1354,7 +1363,8 @@ class EEStackController(CementBaseController): (not self.app.pargs.php) and (not self.app.pargs.mysql) and (not self.app.pargs.postfix) and (not self.app.pargs.wpcli) and (not self.app.pargs.phpmyadmin) and - (not self.app.pargs.adminer) and (not self.app.pargs.utils)): + (not self.app.pargs.adminer) and (not self.app.pargs.utils) and + (not self.app.pargs.mailscanner)): self.app.pargs.web = True if self.app.pargs.web: From 69bed12a4ce6e7d5c2451cf36d598cf68353c3df Mon Sep 17 00:00:00 2001 From: harshadyeola Date: Thu, 5 Feb 2015 17:58:00 +0530 Subject: [PATCH 09/16] improved apt-get --- ee/core/aptget.py | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/ee/core/aptget.py b/ee/core/aptget.py index 46685508..ce6f9712 100644 --- a/ee/core/aptget.py +++ b/ee/core/aptget.py @@ -64,19 +64,6 @@ class EEAptGet(): except Exception as e: Log.debug(self, str(e)) Log.error(self, str(e)) - - try: - #apt_pkg.PkgSystemUnLock() - result = apt_cache.commit() - #apt_cache.close() - return result - except SystemError as e: - Log.debug(self, 'SystemError: ' + str(e)) - Log.error(self, 'SystemError: ' + str(e)) - #apt_cache.close() - except Exception as e: - Log.debug(self, str(e)) - Log.error(self, str(e)) else: #apt_cache.close() Log.error(self, 'Unknown package selected (' + @@ -86,6 +73,20 @@ class EEAptGet(): if not install_package(self, package): continue + if apt_cache.install_count > 0: + try: + #apt_pkg.PkgSystemUnLock() + result = apt_cache.commit() + #apt_cache.close() + return result + except SystemError as e: + Log.debug(self, 'SystemError: ' + str(e)) + Log.error(self, 'SystemError: ' + str(e)) + #apt_cache.close() + except Exception as e: + Log.debug(self, str(e)) + Log.error(self, str(e)) + def remove(self, packages, auto=False, purge=False): """ Similar to `apt-get remove/purge` From e5eeb6746c3c84ca23eab9e386e9695e52182937 Mon Sep 17 00:00:00 2001 From: Mitesh Shah Date: Thu, 5 Feb 2015 18:09:33 +0530 Subject: [PATCH 10/16] Fix typo --- install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install b/install index ecb5125d..1b3a5fc2 100644 --- a/install +++ b/install @@ -222,7 +222,7 @@ if [ ! -f /usr/local/sbin/easyengine ]; then install_ee3 git_init else - ee_lib_echo_fail "EasyEngine 3 allready installed on ur system" + ee_lib_echo_fail "EasyEngine 3 allready installed on your system" exit 1 fi else From 4e0c05693a5504413aa985e4cd26b73346c5d48f Mon Sep 17 00:00:00 2001 From: harshadyeola Date: Thu, 5 Feb 2015 18:22:55 +0530 Subject: [PATCH 11/16] apt-get updated --- ee/core/aptget.py | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/ee/core/aptget.py b/ee/core/aptget.py index ce6f9712..90004b5e 100644 --- a/ee/core/aptget.py +++ b/ee/core/aptget.py @@ -113,18 +113,6 @@ class EEAptGet(): except SystemError as e: Log.debug(self, 'SystemError: ' + str(e)) return False - try: - # apt_pkg.PkgSystemUnLock() - result = apt_cache.commit() - # apt_cache.close() - return result - except SystemError as e: - Log.debug(self, 'SystemError: ' + str(e)) - return False - except Exception as e: - Log.debug(self, str(e)) - Log.error(self, str(e)) - # apt_cache.close() else: # apt_cache.close() Log.error(self, 'Unknown package selected (' + @@ -134,6 +122,20 @@ class EEAptGet(): if not remove_package(self, package, purge=purge): continue + if apt_cache.delete_count > 0: + try: + # apt_pkg.PkgSystemUnLock() + result = apt_cache.commit() + # apt_cache.close() + return result + except SystemError as e: + Log.debug(self, 'SystemError: ' + str(e)) + return False + except Exception as e: + Log.debug(self, str(e)) + Log.error(self, str(e)) + # apt_cache.close() + def auto_clean(self): """ Similar to `apt-get autoclean` From 7c903a9da9a0ac9f298582c8843bd01b29fd2ea9 Mon Sep 17 00:00:00 2001 From: gau1991 Date: Thu, 5 Feb 2015 18:56:37 +0530 Subject: [PATCH 12/16] Removed more hardcoded values --- ee/cli/plugins/debug.py | 11 +++++++---- ee/cli/plugins/stack.py | 30 +++++++++++++---------------- ee/cli/templates/22222.mustache | 12 ++++++------ ee/cli/templates/vimbadmin.mustache | 4 ++-- 4 files changed, 28 insertions(+), 29 deletions(-) diff --git a/ee/cli/plugins/debug.py b/ee/cli/plugins/debug.py index 4d346347..0e384246 100644 --- a/ee/cli/plugins/debug.py +++ b/ee/cli/plugins/debug.py @@ -279,8 +279,10 @@ class EEDebugController(CementBaseController): Log.info(self, "Starting WordPress debug") open("{0}/htdocs/wp-content/debug.log".format(webroot), 'a').close() - EEShellExec.cmd_exec(self, "chown www-data: {0}/htdocs/wp-" - "content/debug.log".format(webroot)) + EEShellExec.cmd_exec(self, "chown {1}: {0}/htdocs/wp-" + "content/debug.log" + "".format(webroot, + EEVariables.ee_php_user)) EEShellExec.cmd_exec(self, "sed -i \"s/define(\'WP_DEBUG\'" ".*/define(\'WP_DEBUG\', true);\\n" "define(\'WP_DEBUG_DISPLAY\', false);" @@ -290,9 +292,10 @@ class EEDebugController(CementBaseController): EEShellExec.cmd_exec(self, "cd {0}/htdocs/ && wp" " plugin --allow-root install " "developer".format(webroot)) - EEShellExec.cmd_exec(self, "chown -R www-data: {0}/htdocs/" + EEShellExec.cmd_exec(self, "chown -R {1}: {0}/htdocs/" "wp-content/plugins" - .format(webroot)) + .format(webroot, + EEVariables.ee_php_user)) else: Log.info(self, "WordPress debug log already enabled") diff --git a/ee/cli/plugins/stack.py b/ee/cli/plugins/stack.py index 38553767..8e2bab44 100644 --- a/ee/cli/plugins/stack.py +++ b/ee/cli/plugins/stack.py @@ -203,7 +203,7 @@ class EEStackController(CementBaseController): '/etc/nginx/common') os.makedirs('/etc/nginx/common') - data = dict() + data = dict(webroot=EEVariables.ee_webroot) Log.debug(self, 'Writting the nginx configuration to ' 'file /etc/nginx/common/acl.conf') ee_nginx = open('/etc/nginx/common/acl.conf', 'w') @@ -450,8 +450,9 @@ class EEStackController(CementBaseController): myfile.write("") EEFileUtils.chown(self, "{0}22222" - .format(EEVariables.ee_webroot), 'www-data', - 'www-data', recursive=True) + .format(EEVariables.ee_webroot), + EEVariables.ee_php_user, + EEVariables.ee_php_user, recursive=True) EEGit.add(self, ["/etc/php5"], msg="Adding PHP into Git") EEService.reload_service(self, 'php5-fpm') @@ -644,7 +645,7 @@ class EEStackController(CementBaseController): " receive_override_options=no_header_body" "_checks/\" /etc/postfix/master.cf") - amavis_master = """smtp-amavis unix - - n - 2 smtp + amavis_master = ("""smtp-amavis unix - - n - 2 smtp -o smtp_data_done_timeout=1200 -o smtp_send_xforward_command=yes -o disable_dns_lookups=yes @@ -665,9 +666,9 @@ class EEStackController(CementBaseController): -o smtpd_hard_error_limit=1000 -o smtpd_client_connection_count_limit=0 -o smtpd_client_connection_rate_limit=0 - -o receive_override_options=no_header_body_checks,no_unknown_recipient_checks - -o local_header_rewrite_clients= -""" + -o receive_override_options=no_header_body_checks,""" + + """no_unknown_recipient_check + -o local_header_rewrite_clients=""") with open("/etc/postfix/master.cf", "a") as am_config: am_config.write(amavis_master) @@ -709,11 +710,9 @@ class EEStackController(CementBaseController): shutil.move('/tmp/phpmyadmin-STABLE/', '{0}22222/htdocs/db/pma/' .format(EEVariables.ee_webroot)) - Log.debug(self, 'Setting Privileges of www-data:www-data to ' + Log.debug(self, 'Setting Privileges of webroot permission to ' '{0}22222/htdocs/db/pma file ' .format(EEVariables.ee_webroot)) - # EEShellExec.cmd_exec(self, 'chown -R www-data:www-data ' - # '/var/www/22222/htdocs/db/pma') EEFileUtils.chown(self, '{0}22222' .format(EEVariables.ee_webroot), EEVariables.ee_php_user, @@ -730,8 +729,6 @@ class EEStackController(CementBaseController): Log.debug(self, "Setting Privileges to " "{0}22222/htdocs/cache/memcache file" .format(EEVariables.ee_webroot)) - # EEShellExec.cmd_exec(self, 'chown -R www-data:www-data ' - # '/var/www/22222/htdocs/cache/memcache') EEFileUtils.chown(self, '{0}22222' .format(EEVariables.ee_webroot), EEVariables.ee_php_user, @@ -757,11 +754,9 @@ class EEStackController(CementBaseController): "/usr/bin/dot\'\" {0}22222/htdocs/" "php/webgrind/config.php" .format(EEVariables.ee_webroot)) - Log.debug(self, "Setting Privileges of www-data:www-data to " + Log.debug(self, "Setting Privileges of webroot permission to " "{0}22222/htdocs/php/webgrind/ file " .format(EEVariables.ee_webroot)) - # EEShellExec.cmd_exec(self, 'chown -R www-data:www-data ' - # '/var/www/22222/htdocs/php/webgrind/') EEFileUtils.chown(self, '{0}22222' .format(EEVariables.ee_webroot), EEVariables.ee_php_user, @@ -858,7 +853,8 @@ class EEStackController(CementBaseController): # Custom Vimbadmin configuration by EasyEngine data = dict(salt=vm_salt, host=EEVariables.ee_mysql_host, - password=vm_passwd) + password=vm_passwd, + php_user=EEVariables.ee_php_user) Log.debug(self, 'Writting the ViMbAdmin configuration to ' 'file {0}22222/htdocs/vimbadmin/application/' 'configs/application.ini' @@ -1017,7 +1013,7 @@ class EEStackController(CementBaseController): static=False, basic=True, wp=False, w3tc=False, wpfc=False, wpsc=False, multisite=False, wpsubdir=False, - webroot='/var/www', ee_db_name='', + webroot=EEVariables.ee_webroot, ee_db_name='', ee_db_user='', ee_db_pass='', ee_db_host='', rc=True) diff --git a/ee/cli/templates/22222.mustache b/ee/cli/templates/22222.mustache index ab6d6a5c..c0897d54 100644 --- a/ee/cli/templates/22222.mustache +++ b/ee/cli/templates/22222.mustache @@ -7,13 +7,13 @@ server { access_log /var/log/nginx/22222.access.log rt_cache; error_log /var/log/nginx/22222.error.log; - ssl_certificate /var/www/22222/cert/22222.crt; - ssl_certificate_key /var/www/22222/cert/22222.key; + ssl_certificate {{webroot}}22222/cert/22222.crt; + ssl_certificate_key {{webroot}}22222/cert/22222.key; # Force HTTP to HTTPS error_page 497 =200 https://$host:22222$request_uri; - root /var/www/22222/htdocs; + root {{webroot}}22222/htdocs; index index.php index.htm index.html; # Turn on directory listing @@ -45,16 +45,16 @@ server { } location ~* \.(js|css|jpg|gif|png)$ { - root /var/www/22222/htdocs/; + root {{webroot}}22222/htdocs/; } location ~* /vimbadmin/public/(.*)/(.*) { - root /var/www/22222/htdocs/vimbadmin/public; + root {{webroot}}22222/htdocs/vimbadmin/public; try_files $uri $uri/ /vimbadmin/public/index.php?$args; } location ~* /vimbadmin/public/(.*) { - root /var/www/22222/htdocs/vimbadmin/public; + root {{webroot}}22222/htdocs/vimbadmin/public; try_files $uri $uri/ /vimbadmin/public/index.php?$args; } diff --git a/ee/cli/templates/vimbadmin.mustache b/ee/cli/templates/vimbadmin.mustache index 16f54d51..808d57ce 100644 --- a/ee/cli/templates/vimbadmin.mustache +++ b/ee/cli/templates/vimbadmin.mustache @@ -628,8 +628,8 @@ resources.session.remember_me_seconds = 3600 resources.session.name = 'VIMBADMIN3' ondemand_resources.logger.writers.stream.path = APPLICATION_PATH "/../var/log" -ondemand_resources.logger.writers.stream.owner = www-data -ondemand_resources.logger.writers.stream.group = www-data +ondemand_resources.logger.writers.stream.owner = {{php_user}} +ondemand_resources.logger.writers.stream.group = {{php_user}} ondemand_resources.logger.writers.stream.mode = single ondemand_resources.logger.writers.stream.logname = vimbadmin.log From fa7040d77a7f5479695cec9791869bfaee2a3db2 Mon Sep 17 00:00:00 2001 From: gau1991 Date: Thu, 5 Feb 2015 19:30:16 +0530 Subject: [PATCH 13/16] EMail validation on setup.py --- setup.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/setup.py b/setup.py index 87d6a385..88863ee6 100644 --- a/setup.py +++ b/setup.py @@ -4,6 +4,7 @@ import sys import os import glob import configparser +import re conf = [] templates = [] @@ -39,6 +40,12 @@ except Exception as e: ee_user = input("Enter your name: ") ee_email = input("Enter your email: ") + + while not re.match(r"^[A-Za-z0-9\.\+_-]+@[A-Za-z0-9\._-]+\.[a-zA-Z]*$", + ee_email): + print("EMail not Valid, Please enter again") + ee_email = input("Enter your email: ") + os.system("git config --global user.name {0}".format(ee_user)) os.system("git config --global user.email {0}".format(ee_email)) From cd9e456efc10a257f04d84c3c20494c9dfe0b1c9 Mon Sep 17 00:00:00 2001 From: harshadyeola Date: Fri, 6 Feb 2015 15:45:07 +0530 Subject: [PATCH 14/16] change in messages --- ee/cli/plugins/stack.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ee/cli/plugins/stack.py b/ee/cli/plugins/stack.py index 38553767..23f9d8ab 100644 --- a/ee/cli/plugins/stack.py +++ b/ee/cli/plugins/stack.py @@ -75,7 +75,7 @@ class EEStackController(CementBaseController): def pre_pref(self, apt_packages): """Pre settings to do before installation packages""" if set(EEVariables.ee_postfix).issubset(set(apt_packages)): - Log.info(self, "Pre-seeding Postfix") + Log.debug(self, "Pre-seeding Postfix") EEShellExec.cmd_exec(self, "echo \"postfix postfix" "/main_mailer_type string \'Internet Site\'\"" " | debconf-set-selections") @@ -90,7 +90,7 @@ class EEStackController(CementBaseController): EERepo.add_key(self, '1C4CBDCDCD2EFD2A', keyserver="subkeys.pgp.net") chars = ''.join(random.sample(string.ascii_letters, 8)) - Log.info(self, "Pre-seeding MySQL") + Log.debug(self, "Pre-seeding MySQL") EEShellExec.cmd_exec(self, "echo \"percona-server-server-5.6 " "percona-server-server/root_password " "password {chars}\" | " From 2e5093202358eda1be0ec9e91d771bc74f472d99 Mon Sep 17 00:00:00 2001 From: harshadyeola Date: Fri, 6 Feb 2015 15:45:28 +0530 Subject: [PATCH 15/16] README changes --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 80779333..d25795c7 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ IMPORTANT [![Travis Build Status](https://travis-ci.org/rtCamp/easyengine.svg "Travis Build Status")] (https://travis-ci.org/rtCamp/easyengine) -EasyEngine (ee) is a linux shell-script collection, which makes it easy to manage your wordpress sites running on nginx web-server. +EasyEngine (ee) is a python tool, which makes it easy to manage your wordpress sites running on nginx web-server. **EasyEngine currently supports:** @@ -94,5 +94,4 @@ ee site create example.com --mysql # create example.com with php & mysql supp [![Donate](https://cloud.githubusercontent.com/assets/4115/5297691/c7b50292-7bd7-11e4-987b-2dc21069e756.png)] (https://rtcamp.com/donate/?project=easyengine) ## License - -Same [GPL] (http://www.gnu.org/licenses/gpl-2.0.txt) that WordPress uses! +[MIT] (http://opensource.org/licenses/MIT) From 118f25a0f108d5da8ac5a96dd93d0693c7207ae2 Mon Sep 17 00:00:00 2001 From: gau1991 Date: Fri, 6 Feb 2015 16:20:27 +0530 Subject: [PATCH 16/16] Added MIT license --- LICENSE | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/LICENSE b/LICENSE index e69de29b..61e6ab0e 100644 --- a/LICENSE +++ b/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 rtCamp solutions private limited + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE.