From c9195e3dfc3f4bfaf3b106667cb997d43dd559b1 Mon Sep 17 00:00:00 2001 From: Denis Poisson Date: Mon, 23 Oct 2017 15:10:28 +0200 Subject: [PATCH] Fix some linter warnings, part 15 --- monasca-notification/apk_install.sh | 2 ++ monasca-notification/start.sh | 8 +++----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/monasca-notification/apk_install.sh b/monasca-notification/apk_install.sh index 6b1fd9a67..203c0b0e5 100644 --- a/monasca-notification/apk_install.sh +++ b/monasca-notification/apk_install.sh @@ -1,3 +1,5 @@ +#!/bin/sh + install_apk_deps() { apk add --no-cache mysql-client ca-certificates apk add --no-cache --virtual build-dep git make g++ linux-headers diff --git a/monasca-notification/start.sh b/monasca-notification/start.sh index 1f26e0353..97aeb133e 100755 --- a/monasca-notification/start.sh +++ b/monasca-notification/start.sh @@ -10,13 +10,12 @@ KAFKA_WAIT_DELAY=${KAFKA_WAIT_DELAY:-"5"} echo "Waiting for MySQL to become available..." success="false" for i in $(seq "$MYSQL_WAIT_RETRIES"); do - mysqladmin status \ + if mysqladmin status \ --host="$MYSQL_DB_HOST" \ --port="$MYSQL_DB_PORT" \ --user="$MYSQL_DB_USERNAME" \ --password="$MYSQL_DB_PASSWORD" \ - --connect_timeout=10 - if [ $? -eq 0 ]; then + --connect_timeout=10; then echo "MySQL is available, continuing..." success="true" break @@ -37,8 +36,7 @@ if [ -n "$KAFKA_WAIT_FOR_TOPICS" ]; then success="false" for i in $(seq "$KAFKA_WAIT_RETRIES"); do - python /kafka_wait_for_topics.py - if [ $? -eq 0 ]; then + if python /kafka_wait_for_topics.py; then success="true" break else