From 6794061edd5dced40c91132b8a9ee70895f7d000 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Sun, 31 Dec 2023 17:08:16 +0100 Subject: [PATCH] Added trigger --- cleanup-all.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cleanup-all.sh b/cleanup-all.sh index 6f5467c..000ef10 100644 --- a/cleanup-all.sh +++ b/cleanup-all.sh @@ -1,5 +1,8 @@ #!/bin/bash +# Define trigger directory argument as TRIGGER_DIR +TRIGGER_DIR="$2" + # Get the absolute path of the directory where the current script is located SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" @@ -25,8 +28,8 @@ for BACKUP_FOLDER_PATH in "$MAIN_DIRECTORY"/*; do if [ -d "$BACKUP_FOLDER_PATH/backup-docker-to-local" ]; then echo "Running cleanup script for folder: $BACKUP_FOLDER" - # Call the cleanup script with just the folder name - "$CLEANUP_SCRIPT" "$BACKUP_FOLDER" + # Call the cleanup script + "$CLEANUP_SCRIPT" "$BACKUP_FOLDER" "$TRIGGER_DIR" else echo "Directory $BACKUP_FOLDER_PATH/backup-docker-to-local not found." fi