Initial commit of general borgmatic configuration, scripts, and systemd files
This commit is contained in:
22
pre-backup-all-docker-compose-down.sh
Executable file
22
pre-backup-all-docker-compose-down.sh
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Collect exclusions passed as arguments
|
||||
exclusions=("$@")
|
||||
|
||||
for dir in /docker/*/
|
||||
do
|
||||
# Get the base folder name from path
|
||||
folder=$(basename "$dir")
|
||||
|
||||
# Skip if folder is in the exclusions array
|
||||
if [[ " ${exclusions[@]} " =~ " $folder " ]]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
cd "$dir" || {
|
||||
echo "Failed to enter directory: $dir"
|
||||
continue
|
||||
}
|
||||
|
||||
docker compose down
|
||||
done
|
||||
Reference in New Issue
Block a user