mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 22:43:42 +00:00
Most of our installation process is idempotent, but this step in particular is not, so it's important to provide a clear error message about how to proceed.
23 lines
715 B
Bash
Executable File
23 lines
715 B
Bash
Executable File
#!/bin/bash -xe
|
|
|
|
# Change to root directory of the checkout that we're running from
|
|
cd "$(dirname "$0")/../.."
|
|
|
|
python manage.py checkconfig
|
|
|
|
python manage.py migrate --noinput
|
|
python manage.py createcachetable third_party_api_results
|
|
|
|
if ! python manage.py initialize_voyager_db; then
|
|
set +x
|
|
echo
|
|
echo -e "\033[32mPopulating default database failed."
|
|
echo "After you fix the problem, you will need to do the following before rerunning this:"
|
|
echo " * supervisorctl stop all # to stop all services that might be accessing the database"
|
|
echo " * scripts/setup/postgres-init-db # run as root to drop and re-create the database"
|
|
echo -e "\033[0m"
|
|
set -x
|
|
fi
|
|
|
|
supervisorctl restart all
|