zulip/scripts
Alex Vandiver b0283c42f9 create-database: Treat "zulip" db without "zerver_messages" as empty.
A user who somehow got an empty `zulip` database, but without a
`zerver_messages` table in it, would get stuck in the installer at:

```
++ su postgres -c 'cd / && psql -v ON_ERROR_STOP=1 -Atc '\''SELECT COUNT(*) FROM zulip.zerver_message;'\'' zulip'
ERROR:  relation "zulip.zerver_message" does not exist
LINE 1: SELECT COUNT(*) FROM zulip.zerver_message;
                             ^
+ records=
```

Treat a failure to select from `zerver_messages` as having 0 messages,
and continue with the `DROP DATABASE IF EXISTS` / `CREATE DATABASE`
that `create-db.sql` usually does.

Fixes: #29110.
2024-03-08 10:10:19 -08:00
..
lib install: Support Ubuntu 24.04. 2024-03-01 17:38:08 -08:00
nagios ruff: Fix SIM118 Use `key in dict` instead of `key in dict.keys()`. 2023-01-04 16:25:07 -08:00
setup create-database: Treat "zulip" db without "zerver_messages" as empty. 2024-03-08 10:10:19 -08:00
README.md docs: Apply bullet style changes from Prettier. 2021-09-08 12:06:24 -07:00
__init__.py
get-django-setting python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
log-search ruff: Fix E226 Missing whitespace around arithmetic operator. 2024-03-01 09:30:04 -08:00
purge-old-deployments zulip_tools: Rename may_be_perform_purging to maybe_perform_purging. 2022-01-12 13:21:35 -08:00
refresh-sharding-and-restart sharding: Configure Tornado sharding with nginx map. 2022-09-15 16:07:50 -07:00
reload-clients reload-clients: Log how many reload events were actually sent. 2024-03-01 09:31:20 -08:00
restart-server python: Reformat with Ruff formatter. 2024-02-29 17:07:16 -08:00
start-server scripts: Add a start-server as well. 2021-04-21 10:24:08 -07:00
stop-server start-server/restart-server: Drop privileges if necessary. 2024-02-07 12:33:00 -08:00
upgrade-zulip upgrade: Modify upgrade scripts to handle failure. 2021-06-23 08:42:20 -07:00
upgrade-zulip-from-git upgrade: Modify upgrade scripts to handle failure. 2021-06-23 08:42:20 -07:00
zulip-puppet-apply ruff: Fix PLR1714 Consider merging multiple comparisons. 2023-07-23 15:21:33 -07:00

README.md

This directory contains scripts that:

  • Generally do not require access to Django or the database (those are "management commands"), and thus are suitable to run operationally.

  • Are useful for managing a production deployment of Zulip (many are also used in a Zulip development environment, though development-only scripts live in tools/).

For more details, see https://zulip.readthedocs.io/en/latest/overview/directory-structure.html.