scripts: Add a script to stop the server.

Using `supervisorctl stop all` to stop the server is not terribly
discoverable, and may stop services which are not part of Zulip
proper.

Add an explicit tool which only stops the relevant services.  It also
more carefully controls the order in which services are stopped to
minimize lost requests, and maximally quiesce the server.

Locations which may be stopping _older_ versions of Zulip (without
this script) are left with using `supervisorctl stop all`.

Fixes #14959.
This commit is contained in:
Alex Vandiver
2021-04-16 05:46:05 +00:00
committed by Tim Abbott
parent 31169526ec
commit 476524c0c1
9 changed files with 63 additions and 11 deletions

View File

@@ -28,7 +28,7 @@ fi
# Shut down all services to ensure a quiescent state.
if [ -e "/var/run/supervisor.sock" ]; then
supervisorctl stop all
su zulip -c "$(dirname "$(dirname "$0")")/stop-server"
fi
# Drop any open connections to any old database.