From 2edd3ec80031a4836d680577ce93e7ee9c92bba4 Mon Sep 17 00:00:00 2001 From: Tushar Sadhwani Date: Sat, 28 Aug 2021 19:13:51 +0530 Subject: [PATCH] Fix whitespace inconsistency in install scripts --- install-demo.sh | 10 +++--- install-prod.sh | 94 ++++++++++++++++++++++++------------------------- 2 files changed, 52 insertions(+), 52 deletions(-) diff --git a/install-demo.sh b/install-demo.sh index fbb6e7e5..1ef9768f 100755 --- a/install-demo.sh +++ b/install-demo.sh @@ -8,12 +8,12 @@ check_dependencies() { if ! command -v curl > /dev/null; then echo "curl is not installed." exit 1 - fi + fi if ! command -v docker > /dev/null; then echo "docker is not installed." exit 1 - fi + fi if ! command -v docker-compose > /dev/null; then echo "docker-compose is not installed." @@ -22,12 +22,12 @@ check_dependencies() { } setup_containers() { - curl -o docker-compose.yml https://raw.githubusercontent.com/knadh/listmonk/master/docker-compose.yml - docker-compose up -d demo-db demo-app + curl -o docker-compose.yml https://raw.githubusercontent.com/knadh/listmonk/master/docker-compose.yml + docker-compose up -d demo-db demo-app } show_output(){ - echo -e "\nListmonk is now up and running. Visit http://localhost:9000 in your browser.\n" + echo -e "\nListmonk is now up and running. Visit http://localhost:9000 in your browser.\n" } diff --git a/install-prod.sh b/install-prod.sh index 891b3270..19ce5d42 100644 --- a/install-prod.sh +++ b/install-prod.sh @@ -31,12 +31,12 @@ check_dependencies() { if ! exists curl; then error "curl is not installed." exit 1 - fi + fi if ! exists docker; then error "docker is not installed." exit 1 - fi + fi if ! exists docker-compose; then error "docker-compose is not installed." @@ -45,81 +45,81 @@ check_dependencies() { } download() { - curl --fail --silent --location --output "$2" "$1" + curl --fail --silent --location --output "$2" "$1" } is_healthy() { - info "waiting for db container to be up. retrying in 3s" - health_status="$(docker inspect -f "{{.State.Health.Status}}" "$1")" - if [ "$health_status" = "healthy" ]; then - return 0 - else - return 1 - fi + info "waiting for db container to be up. retrying in 3s" + health_status="$(docker inspect -f "{{.State.Health.Status}}" "$1")" + if [ "$health_status" = "healthy" ]; then + return 0 + else + return 1 + fi } is_running() { - info "checking if "$1" is running" - status="$(docker inspect -f "{{.State.Status}}" "$1")" - if [ "$status" = "running" ]; then - return 0 - else - return 1 - fi + info "checking if "$1" is running" + status="$(docker inspect -f "{{.State.Status}}" "$1")" + if [ "$status" = "running" ]; then + return 0 + else + return 1 + fi } generate_password(){ - echo $(tr -dc A-Za-z0-9