mirror of
https://github.com/frappe/bench.git
synced 2025-01-09 08:30:39 +00:00
[Minor] Store mysql and admin passwords in passwords.txt and Show success message after completion of the script
This commit is contained in:
parent
164bc13c95
commit
6b5404e9c6
@ -135,7 +135,7 @@ def get_distribution_info():
|
||||
elif platform.system() == "Darwin":
|
||||
current_dist = platform.mac_ver()
|
||||
return "macos", current_dist[0].rsplit('.', 1)[0]
|
||||
|
||||
|
||||
def install_python27():
|
||||
version = (sys.version_info[0], sys.version_info[1])
|
||||
|
||||
@ -256,11 +256,18 @@ def get_passwords(ignore_prompt=False):
|
||||
else:
|
||||
mysql_root_password = admin_password = 'travis'
|
||||
|
||||
return {
|
||||
passwords = {
|
||||
'mysql_root_password': mysql_root_password,
|
||||
'admin_password': admin_password
|
||||
}
|
||||
|
||||
if not ignore_prompt:
|
||||
passwords_file_path = os.path.join(os.path.expanduser('~'), 'passwords.txt')
|
||||
with open(passwords_file_path, 'w') as f:
|
||||
json.dump(passwords, f, indent=1)
|
||||
|
||||
return passwords
|
||||
|
||||
def get_extra_vars_json(extra_args):
|
||||
# We need to pass production as extra_vars to the playbook to execute conditionals in the
|
||||
# playbook. Extra variables can passed as json or key=value pair. Here, we will use JSON.
|
||||
@ -340,3 +347,10 @@ if __name__ == '__main__':
|
||||
args = parse_commandline_args()
|
||||
|
||||
install_bench(args)
|
||||
|
||||
print '''
|
||||
Frappe/ERPNext has been successfully installed on your machine.
|
||||
|
||||
Please find mysql root password and admin password in "passwords.txt" in your root directory,
|
||||
you can remove the file after making note of the passwords.
|
||||
'''
|
||||
|
Loading…
Reference in New Issue
Block a user