# HG changeset patch # User Thierry Florac # Date 1516030450 -3600 # Node ID c3dbfc6488c24e6a35f927c8715aaf95d1ed6156 # Parent 42a3268863b6b548234204c43971ee0f6be045e3 Updated post-install script diff -r 42a3268863b6 -r c3dbfc6488c2 hooks/post_gen_project.py --- a/hooks/post_gen_project.py Sun Nov 26 09:28:30 2017 +0100 +++ b/hooks/post_gen_project.py Mon Jan 15 16:34:10 2018 +0100 @@ -26,7 +26,7 @@ # -# Check for logs directory +# Check user and group # user = '{{ cookiecutter.run_user }}' @@ -36,6 +36,10 @@ group_id = getgrnam(group).gr_gid +# +# Check for logs directory +# + LOGS_DIRECTORY = '{{ cookiecutter.logs_directory }}' if not os.path.exists(LOGS_DIRECTORY): @@ -82,7 +86,7 @@ BIN_DIRECTORY = os.path.join(TARGET, 'bin') -for root, dirs, files in os.walk(VAR_DIRECTORY): +for root, dirs, files in os.walk(BIN_DIRECTORY): for filename in files: try: target = os.path.join(BIN_DIRECTORY, root, filename) @@ -96,16 +100,3 @@ print("- cd {{ cookiecutter.project_slug }}") print("- python3.5 bootstrap.py") print("- ./bin/buildout") - - -{%- if cookiecutter.use_zeo_auth %} -# -# Initialize ZEO authentication file -# - -cmd = os.path.join(TARGET, 'bin', 'zeopasswd') -target = os.path.join(TARGET, 'etc', 'auth.db') -print("\nTo initialize authentication database, please run following command after buildout:") -print('{cmd} -f {target} -p digest -r "{{ cookiecutter.project_name }}" {{ cookiecutter.zeo_auth_user }} ' - '{{ cookiecutter.zeo_auth_password }}'.format(cmd=cmd, target=target)) -{%- endif %}