From d8b44606a35359563e1ef11b334f07350bdfbe4d Mon Sep 17 00:00:00 2001 From: Reid Barton Date: Fri, 28 Aug 2015 09:37:58 -0700 Subject: [PATCH] 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) --- scripts/setup/configure-rabbitmq | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/setup/configure-rabbitmq b/scripts/setup/configure-rabbitmq index da3baa5a95..23ef13ed5c 100755 --- a/scripts/setup/configure-rabbitmq +++ b/scripts/setup/configure-rabbitmq @@ -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 '.*' '.*' '.*'