mirror of
https://github.com/kevinveenbirkenbach/docker-volume-backup-cleanup.git
synced 2024-11-13 01:21:04 +01:00
Added more messages
This commit is contained in:
parent
2949e09aee
commit
3cad6aa0bb
@ -15,8 +15,12 @@ for SUBDIR in "$MAIN_DIRECTORY"/*; do
|
||||
|
||||
# Only proceed if it is a directory
|
||||
if [ -d "$SUBDIR" ]; then
|
||||
echo "Validating directory: $SUBDIR"
|
||||
# Only proceed if the specified trigger directory does not exist within the subdirectory
|
||||
if [ ! -d "$SUBDIR/$TRIGGER_DIR" ]; then
|
||||
FULL_TRIGGER_DIR_PATH="$SUBDIR/$TRIGGER_DIR"
|
||||
if [ ! -d "$FULL_TRIGGER_DIR_PATH" ]; then
|
||||
echo "Validation: error"
|
||||
echo "Missing directory: $FULL_TRIGGER_DIR_PATH"
|
||||
# Display the subdirectory contents
|
||||
echo "Contents of subdirectory: $SUBDIR"
|
||||
ls "$SUBDIR"
|
||||
@ -31,7 +35,8 @@ for SUBDIR in "$MAIN_DIRECTORY"/*; do
|
||||
rm -vrf "$SUBDIR"
|
||||
fi
|
||||
else
|
||||
echo "$SUBDIR contains $TRIGGER_DIR."
|
||||
echo "Validation: ok"
|
||||
echo "$SUBDIR contains $FULL_TRIGGER_DIR_PATH."
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user