Cookiecutter template for cpi moinmoin wikis
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
1.1 KiB

#!/bin/sh
mv /tmp/cookiecutter/{{cookiecutter.directory_name}}/moin_{{cookiecutter.directory_name}} /etc/nginx/sites-available/moin_{{cookiecutter.directory_name}}
mv /tmp/cookiecutter/{{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 /tmp/cookiecutter/{{cookiecutter.directory_name}} /var/www/moin/wikis/{{cookiecutter.directory_name}}
chown -R www-data:www-data /var/www/moin/wikis/{{cookiecutter.directory_name}}
rm -rf /tmp/cookiecutter
echo ""
echo "The wiki was created"
echo ""
echo "You'll need to add the following line to /var/www/moin/config/farmconfig.py"
echo ' ("{{cookiecutter.directory_name}}", r"^https?://{{cookiecutter.domain}}(:8080)?/.*")'
echo ""
echo "An nginx config was created at /etc/nginx/sites-available/moin_{{cookiecutter.directory_name}}"
echo "Activate the config by creating a symbolic link in /etc/nginx/sites-enabled/"
echo "Don't forget to restart/reload uwsgi and nginx"
echo ""