diff --git a/install-demo.sh b/install-demo.sh index fbb6e7e..1ef9768 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 891b327..19ce5d4 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