hooks/post_gen_project.py
changeset 15 c3dbfc6488c2
parent 8 8ab3fffe8d36
--- 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 %}