configure-rabbitmq: Fix shellcheck warnings.

In scripts/setup/configure-rabbitmq line 13:
sudo rabbitmqctl $RABBITMQ_FLAGS delete_user "$RABBITMQ_USERNAME" || true
                 ^-- SC2086: Double quote to prevent globbing and word splitting.

In scripts/setup/configure-rabbitmq line 14:
sudo rabbitmqctl $RABBITMQ_FLAGS delete_user zulip || true
                 ^-- SC2086: Double quote to prevent globbing and word splitting.

In scripts/setup/configure-rabbitmq line 15:
sudo rabbitmqctl $RABBITMQ_FLAGS delete_user guest || true
                 ^-- SC2086: Double quote to prevent globbing and word splitting.

In scripts/setup/configure-rabbitmq line 16:
sudo rabbitmqctl $RABBITMQ_FLAGS add_user "$RABBITMQ_USERNAME" "$RABBITMQ_PASSWORD"
                 ^-- SC2086: Double quote to prevent globbing and word splitting.

In scripts/setup/configure-rabbitmq line 17:
sudo rabbitmqctl $RABBITMQ_FLAGS set_user_tags "$RABBITMQ_USERNAME" administrator
                 ^-- SC2086: Double quote to prevent globbing and word splitting.

In scripts/setup/configure-rabbitmq line 18:
sudo rabbitmqctl $RABBITMQ_FLAGS set_permissions -p / "$RABBITMQ_USERNAME" '.*' '.*' '.*'
                 ^-- SC2086: Double quote to prevent globbing and word splitting.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
This commit is contained in:
Anders Kaseorg 2018-08-03 00:14:47 +00:00 committed by Tim Abbott
parent 21c60bf6d4
commit 78225e4d04
1 changed files with 8 additions and 7 deletions

View File

@ -5,14 +5,15 @@
set -e set -e
set -x set -x
RABBITMQ_FLAGS=()
if [ -n "$RABBITMQ_NODE" ]; then if [ -n "$RABBITMQ_NODE" ]; then
RABBITMQ_FLAGS="-n $RABBITMQ_NODE" RABBITMQ_FLAGS=(-n "$RABBITMQ_NODE")
fi fi
RABBITMQ_USERNAME=$("$(dirname "$0")/../get-django-setting" RABBITMQ_USERNAME) RABBITMQ_USERNAME=$("$(dirname "$0")/../get-django-setting" RABBITMQ_USERNAME)
RABBITMQ_PASSWORD=$("$(dirname "$0")/../get-django-setting" RABBITMQ_PASSWORD) RABBITMQ_PASSWORD=$("$(dirname "$0")/../get-django-setting" RABBITMQ_PASSWORD)
sudo rabbitmqctl $RABBITMQ_FLAGS delete_user "$RABBITMQ_USERNAME" || true sudo rabbitmqctl "${RABBITMQ_FLAGS[@]}" delete_user "$RABBITMQ_USERNAME" || true
sudo rabbitmqctl $RABBITMQ_FLAGS delete_user zulip || true sudo rabbitmqctl "${RABBITMQ_FLAGS[@]}" delete_user zulip || true
sudo rabbitmqctl $RABBITMQ_FLAGS delete_user guest || true sudo rabbitmqctl "${RABBITMQ_FLAGS[@]}" delete_user guest || true
sudo rabbitmqctl $RABBITMQ_FLAGS add_user "$RABBITMQ_USERNAME" "$RABBITMQ_PASSWORD" sudo rabbitmqctl "${RABBITMQ_FLAGS[@]}" add_user "$RABBITMQ_USERNAME" "$RABBITMQ_PASSWORD"
sudo rabbitmqctl $RABBITMQ_FLAGS set_user_tags "$RABBITMQ_USERNAME" administrator sudo rabbitmqctl "${RABBITMQ_FLAGS[@]}" set_user_tags "$RABBITMQ_USERNAME" administrator
sudo rabbitmqctl $RABBITMQ_FLAGS set_permissions -p / "$RABBITMQ_USERNAME" '.*' '.*' '.*' sudo rabbitmqctl "${RABBITMQ_FLAGS[@]}" set_permissions -p / "$RABBITMQ_USERNAME" '.*' '.*' '.*'