mirror of
https://github.com/kevinveenbirkenbach/docker-volume-backup-cleanup.git
synced 2024-11-13 01:21:04 +01:00
Implemented backup directory validation
This commit is contained in:
parent
87fae0c86c
commit
7b00a6584b
@ -5,7 +5,12 @@ BACKUP_HASH="$1"
|
||||
|
||||
# Define main directory containing subdirectories to potentially be deleted
|
||||
MAIN_DIRECTORY="/Backups/$BACKUP_HASH/backup-docker-to-local"
|
||||
echo "Checking backup directory: $MAIN_DIRECTORY"
|
||||
if [ -d "$MAIN_DIRECTORY" ]; then
|
||||
echo "Cleaning up directory: $MAIN_DIRECTORY"
|
||||
else
|
||||
echo "Error: $MAIN_DIRECTORY does not exist."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Define trigger directory argument as TRIGGER_DIR
|
||||
TRIGGER_DIR="$2"
|
||||
|
Loading…
Reference in New Issue
Block a user