From 95aac5caab2179b00a5e29cfff1a3dfd6247e048 Mon Sep 17 00:00:00 2001 From: Holger Frey Date: Tue, 12 Dec 2017 16:06:51 +0100 Subject: [PATCH] Added post generation hook --- hooks/post_gen_project.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 hooks/post_gen_project.sh diff --git a/hooks/post_gen_project.sh b/hooks/post_gen_project.sh new file mode 100644 index 0000000..dfe0f40 --- /dev/null +++ b/hooks/post_gen_project.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +mv {{cookiecutter.directory_name}}/nginx_example_moin_{{cookiecutter.directory_name}} /etc/nginx/sites-available/{{cookiecutter.directory_name}} + +mv {{cookiecutter.directory_name}}/{{cookiecutter.directory_name}}.py /var/www/moin/config/{{cookiecutter.directory_name}}.py +chown www-data:www-data /var/www/moin/config/{{cookiecutter.directory_name}}.py + +mv {{cookiecutter.directory_name}} /var/www/moin/wikis/{{cookiecutter.directory_name}} +chown -R www-data:www-data /var/www/moin/wikis/{{cookiecutter.directory_name}}.py + +echo "" +echo "The wiki was created" +echo "Please adjust the nginx config" +echo "An example file was created at /etc/nginx/sites-available/{{cookiecutter.directory_name}}" +echo "Don't forget to restart/reload uwsgi and nginx" +echo ""