Commit 3f3b18b8 authored by Jorge Moratinos's avatar Jorge Moratinos
Browse files

Merge branch 'OCF20-docker-compose-v2-update-commands-to-remove-unnecessary-hyphens' into 'staging'

Resolve "Docker Compose V2: Update commands to remove unnecessary hyphens (-)"

Closes #20

See merge request !21
parents e50c01ee e98ba6db
Loading
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
#!/bin/bash
running="$(docker-compose -f docker-compose-capif.yml ps --services --all --filter "status=running")"
services="$(docker-compose -f docker-compose-capif.yml ps --services --all)"
running="$(docker compose -f docker-compose-capif.yml ps --services --all --filter "status=running")"
services="$(docker compose -f docker-compose-capif.yml ps --services --all)"
if [ "$running" != "$services" ]; then
    echo "Following services are not running:"
    # Bash specific
+2 −2
Original line number Diff line number Diff line
@@ -62,8 +62,8 @@ echo "after check"
echo "${FILES[@]}"

for FILE in "${FILES[@]}"; do
  echo "Executing 'docker-compose down' for file $FILE"
  docker-compose -f "$FILE" down --rmi all
  echo "Executing 'docker compose down' for file $FILE"
  docker compose -f "$FILE" down --rmi all
  status=$?
    if [ $status -eq 0 ]; then
        echo "*** Removed Service from $FILE ***"
+2 −2
Original line number Diff line number Diff line
@@ -28,13 +28,13 @@ else
fi

# Read params
while getopts ":c:m:h" opt; do
while getopts ":c:mh" opt; do
  case $opt in
    c)
      HOSTNAME="$OPTARG"
      ;;
    m)
      MONITORING_STATE="$OPTARG"
      MONITORING_STATE=true
      ;;
    h)
      help