| 67 | |
| 68 | mysqladmin create pootle -p |
| 69 | |
| 70 | #sed -i "s|'localhost'|'pootle.sahanafoundation.org'|" /var/www/pootle/settings/90-local.conf.sample |
| 71 | sed -i 's|django.db.backends.sqlite3|django.db.backends.mysql|' /var/www/pootle/settings/20-backends.conf |
| 72 | sed -i "s|working_path('dbs/pootle.db')|'pootle'|" /var/www/pootle/settings/20-backends.conf |
| 73 | sed -i "s|'USER': ''|'USER': 'root'|" /var/www/pootle/settings/20-backends.conf |
| 74 | sed -i "s|'PASSWORD': ''|'PASSWORD': 'mysqlrootpw'|" /var/www/pootle/settings/20-backends.conf |
| 75 | sed -i "s|'BACKEND': 'django.core.cache.backends.db.DatabaseCache'|'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache'|" /var/www/pootle/settings/20-backends.conf |
| 76 | sed -i "s|'LOCATION': 'pootlecache'|'LOCATION': '127.0.0.1:11211'|" /var/www/pootle/settings/20-backends.conf |
| 77 | sed -i "s|# ('Your Name', 'your_email@domain.com')| ('Fran Boon', 'fran@sahanafoundation.org')|" /var/www/pootle/settings/30-site.conf |
| 78 | sed -i "s|info@YOUR_DOMAIN.com|pootle@sahanafoundation.org|" /var/www/pootle/settings/30-site.conf |
| 79 | |
| 80 | pootle --config=/var/www/pootle/settings/20-backends.conf syncdb --noinput |
| 81 | pootle --config=/var/www/pootle/settings/20-backends.conf initdb |
| 82 | |
| 83 | cat << EOF > "/var/www/pootle/wsgi.py" |
| 84 | import os, site |
| 85 | site.addsitedir('/var/www/pootle/apps') |
| 86 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "pootle.settings") |
| 87 | from django.core.wsgi import get_wsgi_application |
| 88 | application = get_wsgi_application() |
| 89 | EOF |