diff --git a/README.md b/README.md index 56237fd1..a119d9bf 100644 --- a/README.md +++ b/README.md @@ -19,20 +19,22 @@ EasyEngine (ee) is a linux shell-script collection, which makes it easy to manag - Ubuntu 12.04 & 14.04 - Debian 7 +### This is Beta version. Donot Try on Production/Live servers + ## Quick Start ```bash -wget -qO ee rt.cx/ee && sudo bash ee # install easyengine +wget http://rt.cx/eebeta && sudo bash install # install easyengine 3.0.0-beta sudo ee site create example.com --wp # Install required packages & setup WordPress on example.com ``` ## Update EasyEngine -Update Procedure For EasyEngine +Update Procedure For EasyEngine to version 3.0.0-beta ```bash -wget -qO eeup http://rt.cx/eeup && sudo bash eeup +wget http://rt.cx/eebeta && sudo bash install ``` ## More Site Creation Commands diff --git a/config/bash_completion.d/ee_auto.rc b/config/bash_completion.d/ee_auto.rc index 162edf4b..2e936e1c 100644 --- a/config/bash_completion.d/ee_auto.rc +++ b/config/bash_completion.d/ee_auto.rc @@ -106,11 +106,17 @@ _ee_complete() case "$mprev" in # HANDLE EVERYTHING AFTER THE THIRD LEVEL NAMESPACE - "create" | "update") + "create") COMPREPLY=( $(compgen \ -W "--html --php --mysql --wp --wpsubdir --wpsubdomain --w3tc --wpfc --wpsc" \ -- $cur) ) ;; + + "update") + COMPREPLY=( $(compgen \ + -W "--password --php --mysql --wp --wpsubdir --wpsubdomain --w3tc --wpfc --wpsc" \ + -- $cur) ) + ;; "delete") COMPREPLY=( $(compgen \ -W "--db --files --all" \ diff --git a/ee/cli/plugins/site_functions.py b/ee/cli/plugins/site_functions.py index a8851a60..a4cd3ac5 100644 --- a/ee/cli/plugins/site_functions.py +++ b/ee/cli/plugins/site_functions.py @@ -11,6 +11,7 @@ import string import sys import getpass import glob +import re def setupdomain(self, data): @@ -76,7 +77,7 @@ def setupdatabase(self, data): if prompt_dbname == 'True' or prompt_dbname == 'true': try: - ee_db_name = input('Enter the MySQL database name [{0}]:' + ee_db_name = input('Enter the MySQL database name [{0}]: ' .format(ee_replace_dot)) except EOFError as e: Log.debug(self, "{0}".format(e)) @@ -102,12 +103,11 @@ def setupdatabase(self, data): ee_db_password = ee_random if len(ee_db_username) > 16: - Log.info(self, 'Autofix MySQL username (ERROR 1470 (HY000)),' - ' please wait') + Log.debug(self, 'Autofix MySQL username (ERROR 1470 (HY000)),' + ' please wait') ee_random10 = (''.join(random.sample(string.ascii_uppercase + string.ascii_lowercase + string.digits, 10))) - ee_db_name = (ee_db_name[0:6] + ee_random10) - + ee_db_username = (ee_db_name[0:6] + ee_random10) # create MySQL database Log.info(self, "Setting up database\t\t", end='') Log.debug(self, "Creating databse {0}".format(ee_db_name)) @@ -146,8 +146,8 @@ def setupwordpress(self, data): ee_random = (''.join(random.sample(string.ascii_uppercase + string.ascii_lowercase + string.digits, 15))) ee_wp_prefix = '' - ee_wp_user = '' - ee_wp_pass = '' + # ee_wp_user = '' + # ee_wp_pass = '' Log.info(self, "Downloading Wordpress \t\t", end='') EEFileUtils.chdir(self, '{0}/htdocs/'.format(ee_site_webroot)) @@ -158,9 +158,8 @@ def setupwordpress(self, data): data = setupdatabase(self, data) if prompt_wpprefix == 'True' or prompt_wpprefix == 'true': try: - ee_wp_prefix = input('Enter the WordPress table prefix [wp_]: ' - .format(ee_replace_dot)) - while re.match('^[A-Za-z0-9_]*$', ee_wp_prefix): + ee_wp_prefix = input('Enter the WordPress table prefix [wp_]: ') + while not re.match('^[A-Za-z0-9_]*$', ee_wp_prefix): Log.warn(self, "table prefix can only " "contain numbers, letters, and underscores") ee_wp_prefix = input('Enter the WordPress table prefix [wp_]: ' diff --git a/ee/core/services.py b/ee/core/services.py index ca039155..a32a7ecf 100644 --- a/ee/core/services.py +++ b/ee/core/services.py @@ -118,7 +118,7 @@ class EEService(): try: is_exist = subprocess.getstatusoutput('which {0}' .format(service_name)) - if is_exist == 0: + if is_exist[0] == 0: retcode = subprocess.getstatusoutput('service {0} status' .format(service_name)) if retcode[0] == 0: diff --git a/ee/core/variables.py b/ee/core/variables.py index a80c68cc..9c97032d 100644 --- a/ee/core/variables.py +++ b/ee/core/variables.py @@ -12,7 +12,7 @@ class EEVariables(): """Intialization of core variables""" # EasyEngine version - ee_version = "3.0.0" + ee_version = "3.0.0-beta" # EasyEngine packages versions ee_wp_cli = "0.18.0"