Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

scripts: Switch to stop-server/restart-server.

Alex Vandivera4d0f0331999
diff --git a/scripts/setup/create-database b/scripts/setup/create-database
index 6d0b8fd8027..0c7245f31d4 100755
--- a/scripts/setup/create-database
+++ b/scripts/setup/create-database
@@ -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.
diff --git a/scripts/setup/initialize-database b/scripts/setup/initialize-database
index b7ce7d87ac8..b66dba4f5ce 100755
--- a/scripts/setup/initialize-database
+++ b/scripts/setup/initialize-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
diff --git a/scripts/setup/restore-backup b/scripts/setup/restore-backup
index c9d8a1bdaed..62fe58fd31e 100755
--- a/scripts/setup/restore-backup
+++ b/scripts/setup/restore-backup
@@ -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")])