#!/bin/bash # Directory containing docker-compose files directory="/media/data/jarvis/docker" # Loop through each subfolder for subfolder in "$directory"/*; do if [ -d "$subfolder" ]; then cd "$subfolder" || exit # Check if docker-compose.yml or docker-compose.yaml file exists if [ -e "docker-compose.yml" ] || [ -e "docker-compose.yaml" ]; then echo "Stopping containers in $subfolder" docker-compose stop else echo "No docker-compose file found in $subfolder" fi fi done