Mailman: fix initial data
This commit is contained in:
parent
7f27054e60
commit
3feaacf3eb
2 changed files with 8 additions and 2 deletions
|
@ -10,9 +10,13 @@ BASEDIR=`yamlget basedir $CONFFILE`
|
||||||
CONFDIR=`yamlget confdir $CONFFILE`
|
CONFDIR=`yamlget confdir $CONFFILE`
|
||||||
INDEXDIR=$BASEDIR/fulltext_index
|
INDEXDIR=$BASEDIR/fulltext_index
|
||||||
|
|
||||||
|
echo "static files"
|
||||||
django-admin collectstatic --clear --noinput --verbosity 0 --pythonpath $CONFDIR --settings settings
|
django-admin collectstatic --clear --noinput --verbosity 0 --pythonpath $CONFDIR --settings settings
|
||||||
django-admin compress --pythonpath $CONFDIR --settings settings
|
django-admin compress --pythonpath $CONFDIR --settings settings
|
||||||
|
echo "db migration"
|
||||||
django-admin migrate --pythonpath $CONFDIR --settings settings_admin --noinput
|
django-admin migrate --pythonpath $CONFDIR --settings settings_admin --noinput
|
||||||
|
echo "load initial data"
|
||||||
|
django-admin loaddata $CONFDIR/initial-data.json --pythonpath $CONFDIR --settings settings
|
||||||
mkdir -p $INDEXDIR
|
mkdir -p $INDEXDIR
|
||||||
chown apache:apache -R $INDEXDIR
|
chown apache:apache -R $INDEXDIR
|
||||||
|
|
||||||
|
@ -21,9 +25,11 @@ sleep $[ ( $RANDOM % 10 ) + 1 ]s # avoid simultaneous lockups on parallel serve
|
||||||
$BASEDIR/bin/pg-give-rights.py > /dev/null
|
$BASEDIR/bin/pg-give-rights.py > /dev/null
|
||||||
|
|
||||||
# SELinux contexts
|
# SELinux contexts
|
||||||
|
echo "SELinux contexts"
|
||||||
restorecon -r "$BASEDIR"
|
restorecon -r "$BASEDIR"
|
||||||
|
|
||||||
# Run unit tests
|
# Run unit tests
|
||||||
|
echo "unit tests"
|
||||||
django-admin test --pythonpath $CONFDIR --settings settings_test hyperkitty postorius
|
django-admin test --pythonpath $CONFDIR --settings settings_test hyperkitty postorius
|
||||||
|
|
||||||
# Reload Apache to flush the python cache
|
# Reload Apache to flush the python cache
|
||||||
|
|
|
@ -372,8 +372,8 @@
|
||||||
- periodic.py
|
- periodic.py
|
||||||
|
|
||||||
- name: copy the initial user fixture
|
- name: copy the initial user fixture
|
||||||
copy: src=postorius.initial-user.json
|
template: src=initial-data.json
|
||||||
dest=/etc/postorius/sites/default/initial-user.json
|
dest={{ mailman_webui_basedir }}/config/initial-data.json
|
||||||
owner=root group=apache mode=0640
|
owner=root group=apache mode=0640
|
||||||
tags: mailman
|
tags: mailman
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue