diff --git a/scripts/setup/create-database b/scripts/setup/create-database new file mode 100755 index 0000000000..f9660a1869 --- /dev/null +++ b/scripts/setup/create-database @@ -0,0 +1,11 @@ +#!/bin/sh -xe + +ln -s /var/cache/postgresql/dicts/en_us.dict /usr/share/postgresql/9.1/tsearch_data/en_us.dict +ln -s /var/cache/postgresql/dicts/en_us.affix /usr/share/postgresql/9.1/tsearch_data/en_us.affix + +echo "DROP SCHEMA zulip CASCADE; CREATE SCHEMA zulip;" | python manage.py dbshell + +python manage.py syncdb --noinput +python manage.py migrate +python manage.py createcachetable third_party_api_results +python manage.py initialize_local_server_db diff --git a/scripts/setup/install b/scripts/setup/install index 37b9da38f7..c801a292c3 100755 --- a/scripts/setup/install +++ b/scripts/setup/install @@ -38,17 +38,19 @@ ln -nsf /etc/zulip/settings.py /root/zulip/zproject/local_settings.py /root/zulip/scripts/setup/configure-rabbitmq -chown zulip:zulip /var/run/supervisor.sock +/root/zulip/scripts/setup/postgres-init-db +/root/zulip/scripts/setup/create-database deploy_path=$($(dirname $(dirname $0))/unpack-zulip "$tarball") ln -nsf "$deploy_path" /home/zulip/deployments/current chown -R zulip:zulip /home/zulip/deployments +chown zulip:zulip /var/run/supervisor.sock +supervisorctl restart all + set +x cat <