19 lines
526 B
Bash
19 lines
526 B
Bash
#!/bin/bash
|
|
|
|
for dir in /home/ccalifice/*; do
|
|
# Remove trailing slash
|
|
dir=${dir%/}
|
|
|
|
# Check if it is a directory and does NOT end with "DISABLED"
|
|
if [[ -d "$dir" && ! "$dir" =~ DISABLED$ ]]; then
|
|
if [ -f "$dir/docker-compose.yml" ]; then
|
|
echo "Bringing down Docker Compose in $dir"
|
|
(cd "$dir" && docker compose down)
|
|
else
|
|
echo "No docker-compose.yml found in $dir, skipping."
|
|
fi
|
|
else
|
|
echo "Project is disabled. Skipping $dir"
|
|
fi
|
|
done
|