Make configure-rabbitmq fail on error

If there's a problem with Django settings then RMQPW would just be
empty, causing more confusing errors downstream.

(imported from commit 5948b1a15eb92fc032ea02e499be58365d8e9ecb)
This commit is contained in:
Reid Barton 2015-08-28 09:37:58 -07:00
parent 4e61c06903
commit d8b44606a3
1 changed files with 2 additions and 2 deletions

View File

@ -1,11 +1,11 @@
#!/bin/sh
#!/bin/sh -xe
#
# Delete the "guest" default user and replace it with a Zulip user
# with a real password
RMQPW=$($(dirname $0)/../../bin/get-django-setting RABBITMQ_PASSWORD)
sudo rabbitmqctl delete_user zulip || true
sudo rabbitmqctl delete_user guest
sudo rabbitmqctl delete_user guest || true
sudo rabbitmqctl add_user zulip $RMQPW
sudo rabbitmqctl set_user_tags zulip administrator
sudo rabbitmqctl set_permissions -p / zulip '.*' '.*' '.*'