mirror of https://github.com/zulip/zulip.git
scripts: Switch to stop-server/restart-server.
stop-server and restart-server address all services which talk to the database, and are thus more correct than restarting or stopping everything in supervisor. This is possible now that the previous commit ensures that the zulip user can read the zulip installation directory during `create-database`; previously, that directory was still owned by root when `create-database` was run, whereas now it is in `~zulip/deployments/`.
This commit is contained in:
parent
c0cc98c6a8
commit
a4d0f03319
|
@ -32,7 +32,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 "$0")/../stop-server"
|
||||
fi
|
||||
|
||||
# Drop any open connections to any old database.
|
||||
|
|
|
@ -45,7 +45,7 @@ cd "$THIS_DIR/../.."
|
|||
#
|
||||
# In either case, it doesn't make sense to restart supervisor jobs
|
||||
if [ -e "/var/run/supervisor.sock" ]; then
|
||||
supervisorctl restart all
|
||||
./scripts/restart-server
|
||||
fi
|
||||
|
||||
set +x
|
||||
|
|
|
@ -146,7 +146,7 @@ def restore_backup(tarball_file: IO[bytes]) -> None:
|
|||
os.setresuid(uid, uid, 0)
|
||||
|
||||
if settings.PRODUCTION:
|
||||
run(["supervisorctl", "restart", "all"])
|
||||
run([os.path.join(settings.DEPLOY_ROOT, "scripts", "restart-server")])
|
||||
|
||||
run([os.path.join(settings.DEPLOY_ROOT, "scripts", "setup", "flush-memcached")])
|
||||
|
||||
|
|
Loading…
Reference in New Issue