Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
create-database: Skip stop-server and flush-memcached on standalone Pg.
If running on a stand-alone PostgreSQL server, then supervisor does exist -- but `stop-server` is useless, and in fact cannot run because the Zulip directory may not be readable by the `zulip` user. Detect if this is an application front-end server by looking for `/home/zulip/deployments`, and use the stop-server and flush-memcached from there if it exists. The `create-db.sql` and `terminate-psql-sessions` files are still read from the local directory, but those already have precautions from being from a non-world-readable directory, and are more obviously important to keep in sync with the `create-database` script.
- Loading branch information