Commit e98ba6db authored by Jorge Moratinos's avatar Jorge Moratinos
Browse files

Change docker-compose to docker compose at scripts

parent e50c01ee
Loading
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
#!/bin/bash
#!/bin/bash
running="$(docker-compose -f docker-compose-capif.yml ps --services --all --filter "status=running")"
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)"
services="$(docker compose -f docker-compose-capif.yml ps --services --all)"
if [ "$running" != "$services" ]; then
if [ "$running" != "$services" ]; then
    echo "Following services are not running:"
    echo "Following services are not running:"
    # Bash specific
    # Bash specific
+2 −2
Original line number Original line Diff line number Diff line
@@ -62,8 +62,8 @@ echo "after check"
echo "${FILES[@]}"
echo "${FILES[@]}"


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


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