From 5b7be7ba5dc80626c297ae439a08ab47e6ecef1f Mon Sep 17 00:00:00 2001 From: Alex Vandiver Date: Wed, 17 Jun 2020 14:27:51 -0700 Subject: [PATCH] installer: Do not initialize db with --no-init-db. The `--no-init-db` option previously only controlled if `initialize-database` was run, which sets up the tables inside the database. If PostgreSQL was installed locally, it still attempted to create the user and empty database. This fails on hosts which are remote PostgreSQL hosts, and not application hosts, as: - They may already have a local database, and while `initialize-datbase` will detect and offer to abort if one is found,`--no-init-db` seems like it should be the option to not overwrite it - `flush-memcached` requires that a local venv be installed, which it often is not on non-frontend machines. Skip the database configuration when run with `--no-init-db`. --- scripts/lib/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/lib/install b/scripts/lib/install index 8bef0a2a4e..76e7c1f621 100755 --- a/scripts/lib/install +++ b/scripts/lib/install @@ -402,7 +402,7 @@ EOF "$ZULIP_PATH"/scripts/setup/configure-rabbitmq fi -if [ "$has_postgres" = 0 ]; then +if [ "$has_postgres" = 0 ] && [ -z "$NO_INIT_DB" ]; then "$ZULIP_PATH"/scripts/setup/postgres-init-db fi