postgresql-init-db: Fix installation from world-unreadable directory.

This reverts part of commit 476524c0c1
(#18215), to fix this error when running the installer from a
directory that isn’t world-readable:

+ '[' -e /var/run/supervisor.sock ']'
+++ dirname /root/zulip-server-4.1/scripts/setup/postgresql-init-db
++ dirname /root/zulip-server-4.1/scripts/setup
+ su zulip -c /root/zulip-server-4.1/scripts/stop-server
bash: /root/zulip-server-4.1/scripts/stop-server: Permission denied

Zulip installation failed (exit code 126)!

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2021-05-13 21:05:47 -07:00 committed by Tim Abbott
parent 6766a3f780
commit bc45525369
1 changed files with 1 additions and 1 deletions

View File

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