zulip/scripts/setup
Anders Kaseorg 9937734e50 terminate-psql-sessions: Only terminate if we have permissions.
We have been semi-accidentally relying on the fact that terminate-psql-sessions 
fails silently when there are PIDs we don't have permission to terminate.

This actually happens somewhat often, generally when we're doing a series of
operations in quick succession by different users, because postgres processes
live a little longer than the `psql` shell that started them.

As part of adding ON_STOP_ERROR to all of our postgres commands, it makes
sense to enforce we don't fail here, but that means we need to actually filter
the target PIDs to only ones we can actually kill.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-04-23 14:41:42 -07:00
..
configure-rabbitmq configure-rabbitmq: Allow running as root. 2019-04-04 16:52:20 -07:00
debathena-archive.asc scripts: Initialize setup-apt-repo-debathena. 2018-12-11 13:01:26 -08:00
flush-memcached flush-memcached: Replace 'set -x' with more clear output. 2016-10-14 17:10:06 -07:00
generate-self-signed-cert generate-self-signed-cert: Generalize to CentOS, Fedora, RHEL. 2019-01-05 15:49:02 -08:00
generate_secrets.py scripts: Remove unused imports. 2019-02-02 17:02:58 -08:00
initialize-database initialize-database: Fix shellcheck warnings. 2018-08-03 09:15:26 -07:00
install Use #!/usr/bin/env for bash shebangs. 2018-12-17 17:21:08 -08:00
packagecloud.asc apt: Add packagecloud repository for Debian. 2018-05-05 10:03:03 -07:00
pgroonga-debian.asc setup-apt-repo: Add pgroonga code for Debian stretch. 2017-07-14 17:22:20 -07:00
pgroonga-ppa.asc
postgres-create-db scripts: Always use ON_ERROR_STOP=1 when running psql. 2019-04-22 14:54:19 -07:00
postgres-init-db scripts: Always use ON_ERROR_STOP=1 when running psql. 2019-04-22 14:54:19 -07:00
restore-backup restore-backup: Open backup tarball as root. 2019-04-17 12:26:03 -07:00
setup-certbot setup-certbot: Remove --force-renewal. (#11652) 2019-02-22 15:50:38 -08:00
terminate-psql-sessions terminate-psql-sessions: Only terminate if we have permissions. 2019-04-23 14:41:42 -07:00
zulip-ppa.asc