Don't chown supervisor socket if it doesn't exist.

This commit is contained in:
Tim Abbott 2016-04-26 15:20:06 -07:00
parent 6a3c775842
commit dc772518e7
2 changed files with 7 additions and 2 deletions

View File

@ -66,7 +66,10 @@ ln -nsf /etc/zulip/settings.py "$deploy_path"/zproject/local_settings.py
mkdir -p "$deploy_path"/prod-static/serve mkdir -p "$deploy_path"/prod-static/serve
cp -rT "$deploy_path"/prod-static/serve /home/zulip/prod-static cp -rT "$deploy_path"/prod-static/serve /home/zulip/prod-static
chown -R zulip:zulip /home/zulip /var/log/zulip /etc/zulip/settings.py chown -R zulip:zulip /home/zulip /var/log/zulip /etc/zulip/settings.py
if [ -e "/var/run/supervisor.sock" ]; then
# If supervisor isn't running, no need to chown its socket
chown zulip:zulip /var/run/supervisor.sock chown zulip:zulip /var/run/supervisor.sock
fi
cd /home/zulip/deployments/current cd /home/zulip/deployments/current

View File

@ -3,7 +3,9 @@ set -e
set -x set -x
# 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
supervisorctl stop all supervisorctl stop all
fi
# Drop any open connections to any old database. Hackishly call using # Drop any open connections to any old database. Hackishly call using
# source because postgres user can't read /root/zulip/scripts/setup. # source because postgres user can't read /root/zulip/scripts/setup.