mirror of
https://github.com/kevinveenbirkenbach/docker-volume-backup-cleanup.git
synced 2024-11-21 13:21:04 +01:00
Compare commits
3 Commits
62d69bac03
...
8cac183c17
Author | SHA1 | Date | |
---|---|---|---|
8cac183c17 | |||
78ea7ba2ff | |||
f0c235ac67 |
2
cleanup-all.sh
Normal file → Executable file
2
cleanup-all.sh
Normal file → Executable file
@ -7,7 +7,7 @@ TRIGGER_DIR="$2"
|
||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
|
||||
|
||||
# Define the path to the original cleanup script using the script directory path
|
||||
CLEANUP_SCRIPT="$SCRIPT_DIR/cleanup_script.sh"
|
||||
CLEANUP_SCRIPT="$SCRIPT_DIR/cleanup.sh"
|
||||
|
||||
# Path to the main directory
|
||||
MAIN_DIRECTORY="/Backups"
|
||||
|
4
cleanup.sh
Normal file → Executable file
4
cleanup.sh
Normal file → Executable file
@ -18,9 +18,9 @@ for SUBDIR in "$MAIN_DIRECTORY"/*; do
|
||||
# Only proceed if it is a directory
|
||||
if [ -d "$SUBDIR" ]; then
|
||||
echo "Validating directory: $SUBDIR"
|
||||
|
||||
scripts_directory="$(dirname "$(dirname "$(realpath "$0")")")"
|
||||
# Call the Python script for validation
|
||||
python ../directory-validator/directory-validator.py "$SUBDIR" --validate
|
||||
python $scripts_directory/directory-validator/directory-validator.py "$SUBDIR" --validate
|
||||
VALIDATION_STATUS=$?
|
||||
|
||||
if [ $VALIDATION_STATUS -eq 0 ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user